Package org.mule.api.endpoint

Examples of org.mule.api.endpoint.OutboundEndpoint.process()


        MuleEvent event = getTestEvent("test");
        event.getMessage().setOutboundProperty("port", 12345);

        try
        {
            endpoint.process(event);
            fail("A required header is missing on the message");
        }
        catch (DispatchException e)
        {
            //expected
View Full Code Here


        MuleEvent event = getTestEvent("test");
        event.getMessage().setOutboundProperty("port", 12345);
        event.getMessage().setOutboundProperty("host", "localhost");

        endpoint.process(event);
        assertTrue(endpoint.getConnector() instanceof TestConnector);
        assertEquals("myTestConnector", endpoint.getConnector().getName());
    }

    public void testMEPURIParam() throws Exception
View Full Code Here

        MuleEvent event = getTestEvent("test");
        event.getMessage().setOutboundProperty("port", 12345);
        event.getMessage().setOutboundProperty("host", "localhost");

        endpoint.process(event);
        //The default for the Test connector is ONE_WAY
        assertEquals(MessageExchangePattern.ONE_WAY, endpoint.getExchangePattern());

        //Now test set on the endpoint
        endpoint = createEndpoint("test://#[header:host]:#[header:port]?exchangePattern=REQUEST_RESPONSE");
View Full Code Here

        event = getTestEvent("test");
        event.getMessage().setOutboundProperty("port", 12345);
        event.getMessage().setOutboundProperty("host", "localhost");

        endpoint.process(event);
        assertEquals(MessageExchangePattern.REQUEST_RESPONSE, endpoint.getExchangePattern());
    }

    protected OutboundEndpoint createEndpoint(String uri) throws EndpointException, InitialisationException
    {
View Full Code Here

        assertTrue(endpoint instanceof DynamicOutboundEndpoint);

        testOutboundEvent = createTestOutboundEvent();
        //First Request creates the real endpoint
        endpoint.process(testOutboundEvent);

        setUpFakeDispatcher(endpoint);
        MuleEvent result = endpoint.process(testOutboundEvent);

        assertMessageSentEqual(true);
View Full Code Here

        testOutboundEvent = createTestOutboundEvent();
        //First Request creates the real endpoint
        endpoint.process(testOutboundEvent);

        setUpFakeDispatcher(endpoint);
        MuleEvent result = endpoint.process(testOutboundEvent);

        assertMessageSentEqual(true);

        // Response message is not the same because we rewrite the response event and
        // this change the properties
View Full Code Here

        OutboundEndpoint endpoint = createOutboundEndpoint( null, null, null,
            null, MessageExchangePattern.ONE_WAY, null);

        testOutboundEvent = createTestOutboundEvent();
        //First Request creates the real endpoint
        endpoint.process(testOutboundEvent);
        Thread.sleep(1000);

        setUpFakeDispatcher(endpoint);

        assertTrue(endpoint instanceof DynamicOutboundEndpoint);
View Full Code Here

        setUpFakeDispatcher(endpoint);

        assertTrue(endpoint instanceof DynamicOutboundEndpoint);

        MuleEvent result = endpoint.process(testOutboundEvent);

        dispacher.latch.await(RECEIVE_TIMEOUT, TimeUnit.MILLISECONDS);
        assertMessageSentEqual(false);
        assertNull(result);
    }
View Full Code Here

        assertTrue(endpoint instanceof DynamicOutboundEndpoint);

        testOutboundEvent = createTestOutboundEvent();
        //First Request creates the real endpoint
        endpoint.process(testOutboundEvent);

        setUpFakeDispatcher(endpoint);
        MuleEvent result = endpoint.process(testOutboundEvent);

        assertMessageSentEqual(true);
View Full Code Here

        testOutboundEvent = createTestOutboundEvent();
        //First Request creates the real endpoint
        endpoint.process(testOutboundEvent);

        setUpFakeDispatcher(endpoint);
        MuleEvent result = endpoint.process(testOutboundEvent);

        assertMessageSentEqual(true);

        // Response message is not the same because we rewrite the response event and
        // this change the properties
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.