Package org.mule.processor.chain

Examples of org.mule.processor.chain.DefaultMessageProcessorChainBuilder.build()


            // Compose request and response chains. We do this so that if the request
            // chain returns early the response chain is still invoked.
            DefaultMessageProcessorChainBuilder compositeChainBuilder = new EndpointMessageProcessorChainBuilder(endpoint, flowConstruct);
            compositeChainBuilder.setName("InboundEndpoint '"+ endpoint.getEndpointURI().getUri() +"' composite request/response chain");
            compositeChainBuilder.chain(requestChainBuilder.build(), responseChainBuilder.build());
            return compositeChainBuilder.build();
        }
    }

    public MessageProcessor createOutboundMessageProcessorChain(OutboundEndpoint endpoint, MessageProcessor target) throws MuleException
    {
View Full Code Here


        }
        requestChainBuilder.chain(target);
       
        if (!endpoint.getExchangePattern().hasResponse())
        {
            return requestChainBuilder.build();
        }
        else
        {
            // -- RESPONSE CHAIN --
            DefaultMessageProcessorChainBuilder responseChainBuilder = new EndpointMessageProcessorChainBuilder(endpoint);
View Full Code Here

            // Compose request and response chains. We do this so that if the request
            // chain returns early the response chain is still invoked.
            DefaultMessageProcessorChainBuilder compositeChainBuilder = new EndpointMessageProcessorChainBuilder(endpoint);
            compositeChainBuilder.setName("OutboundEndpoint '" + endpoint.getEndpointURI().getUri() + "' composite request/response chain");
            compositeChainBuilder.chain(requestChainBuilder.build(), responseChainBuilder.build());
            return compositeChainBuilder.build();
        }
    }
}
View Full Code Here

            }
        });

        chainBuilder.chain(config.createOutboundMessageProcessor());

        return chainBuilder.build();
    }

    /**
     * Creates the CXF message processor that will be used to create the SOAP envelope.
     */
 
View Full Code Here

        MessageProcessorChainBuilder builder = new DefaultMessageProcessorChainBuilder(flowConstruct);
        processingStrategy.configureProcessors(Collections.singletonList(delegate), nameSource, builder,
                                               muleContext);
        try
        {
            target = builder.build();
        }
        catch (MuleException e)
        {
            throw new InitialisationException(e, this);
        }
View Full Code Here

                    public MuleEvent process(MuleEvent event) throws MuleException
                    {
                        return invokeInternal(event);
                    }
                });
                interceptorChain = chainBuilder.build();
                applyLifecycleAndDependencyInjection(interceptorChain);
                doInitialise();
            }
        });
    }
View Full Code Here

            {
                builder.chain(((MessageProcessorBuilder) messageProcessor));
                continue;
            }
        }
        return builder.build();
    }

    public Flow getFlow()
    {
        return flow;
View Full Code Here

    public void testResponseAdaptorSingleMP() throws MuleException, Exception
    {
        DefaultMessageProcessorChainBuilder builder = new DefaultMessageProcessorChainBuilder();
        builder.chain(new StringAppendTransformer("1"), new ResponseMessageProcessorAdapter(
            new StringAppendTransformer("3")), new StringAppendTransformer("2"));
        assertEquals("0123", builder.build().process(getTestEventUsingFlow("0")).getMessageAsString());
    }

    @Test
    public void testResponseAdaptorSingleMPReturnsNull() throws MuleException, Exception
    {
View Full Code Here

    public void testResponseAdaptorSingleMPReturnsNull() throws MuleException, Exception
    {
        DefaultMessageProcessorChainBuilder builder = new DefaultMessageProcessorChainBuilder();
        builder.chain(new StringAppendTransformer("1"), new ResponseMessageProcessorAdapter(
            new ReturnNullMP()), new StringAppendTransformer("2"));
        assertEquals("012", builder.build().process(getTestEventUsingFlow("0")).getMessageAsString());
    }

    @Test
    public void testResponseAdaptorNestedChain() throws MuleException, Exception
    {
View Full Code Here

        builder.chain(
            new StringAppendTransformer("1"),
            new ResponseMessageProcessorAdapter(new DefaultMessageProcessorChainBuilder().chain(
                new StringAppendTransformer("a"), new StringAppendTransformer("b")).build()),
            new StringAppendTransformer("2"));
        assertEquals("012ab", builder.build().process(getTestEventUsingFlow("0")).getMessageAsString());
    }

    @Test
    public void testResponseAdaptorNestedChainReturnsNull() throws MuleException, 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.