Package org.mule.api.endpoint

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


        OutboundEndpoint ep = muleContext.getEndpointFactory().getOutboundEndpoint(
            builder);
       
        try
        {
            ep.process(getTestEvent("hello"));
        }
        catch (Exception e)
        {
            assertTrue(e instanceof DispatchException);
            assertTrue(e.getCause() instanceof NoSuchMethodException);
View Full Code Here


     */
    public void dispatch(String url, MuleMessage message) throws MuleException
    {
        OutboundEndpoint endpoint = getOutboundEndpoint(url, MessageExchangePattern.ONE_WAY, null);
        MuleEvent event = getEvent(message, MessageExchangePattern.ONE_WAY);
        endpoint.process(event);
    }

    /**
     * Sends an event synchronously to a component
     *
 
View Full Code Here

            getOutboundEndpoint(url, MessageExchangePattern.REQUEST_RESPONSE, timeout);
       
        MuleEvent event = getEvent(message, MessageExchangePattern.REQUEST_RESPONSE);
        event.setTimeout(timeout);

        MuleEvent response = endpoint.process(event);
        if (response != null)
        {
            return response.getMessage();
        }
        else
View Full Code Here

        MuleMessage message = new DefaultMuleMessage(payload, messageProperties, muleContext);
       
        OutboundEndpoint endpoint =
            getOutboundEndpoint(url, MessageExchangePattern.REQUEST_RESPONSE, null);
        MuleEvent event = getEvent(message, MessageExchangePattern.REQUEST_RESPONSE);
        endpoint.process(event);
    }

    /**
     * The overriding method may want to return a custom {@link MuleContext} here
     *
 
View Full Code Here

    }

    public MuleMessage send(String url, MuleMessage message) throws MuleException
    {
        OutboundEndpoint endpoint = endpointCache.getOutboundEndpoint(url, MessageExchangePattern.REQUEST_RESPONSE, null);
        return returnMessage(endpoint.process(createMuleEvent(message, endpoint)));
    }

    public MuleMessage send(String url, Object payload, Map<String, Object> messageProperties, long timeout)
        throws MuleException
    {
View Full Code Here

    }

    public MuleMessage send(String url, MuleMessage message, long timeout) throws MuleException
    {
        OutboundEndpoint endpoint = endpointCache.getOutboundEndpoint(url, MessageExchangePattern.REQUEST_RESPONSE, timeout);
        return returnMessage(endpoint.process(createMuleEvent(message, endpoint)));
    }

    public void dispatch(String url, MuleMessage message) throws MuleException
    {
        OutboundEndpoint endpoint = endpointCache.getOutboundEndpoint(url, MessageExchangePattern.ONE_WAY, null);
View Full Code Here

    }

    public void dispatch(String url, MuleMessage message) throws MuleException
    {
        OutboundEndpoint endpoint = endpointCache.getOutboundEndpoint(url, MessageExchangePattern.ONE_WAY, null);
        endpoint.process(createMuleEvent(message, endpoint));
    }

    public MuleMessage request(String url, long timeout) throws MuleException
    {
        InboundEndpoint endpoint = endpointCache.getInboundEndpoint(url, MessageExchangePattern.ONE_WAY);
View Full Code Here

    public MuleMessage process(String uri, MessageExchangePattern mep, MuleMessage message)
        throws MuleException
    {
        OutboundEndpoint endpoint = endpointCache.getOutboundEndpoint(uri, mep, null);
        return returnMessage(endpoint.process(createMuleEvent(message, endpoint)));
    }

    protected MuleEvent createMuleEvent(MuleMessage message, OutboundEndpoint endpoint) throws EndpointException
    {
        DefaultMuleSession session = new DefaultMuleSession(new MuleClientFlowConstruct(muleContext), muleContext);
View Full Code Here

        assertTrue(endpoint.getConnector() instanceof NullConnector);

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

        endpoint.process(event);
        assertTrue(endpoint.getConnector() instanceof TestConnector);


    }
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);
    }

    public void testMissingExpressionResult() throws Exception
    {
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.