Package org.mule.transformer.simple

Examples of org.mule.transformer.simple.StringAppendTransformer


        @Override
        public Object onCall(MuleEventContext eventContext) throws Exception
        {
            Flow flow = (Flow) eventContext.getMuleContext().getRegistry().lookupFlowConstruct("dynamicComponentFlow");
            pipelineId = flow.dynamicPipeline(pipelineId).injectBefore(new StringAppendTransformer("chain update #" + ++count)).resetAndUpdate();
            return eventContext.getMessage();
        }
View Full Code Here


    static class TestNonIntercepting implements MessageProcessor
    {
        public MuleEvent process(MuleEvent event) throws MuleException
        {
            return new StringAppendTransformer("MessageProcessor").process(event);
        }
View Full Code Here

    static class TestIntercepting extends AbstractInterceptingMessageProcessor
    {
        public MuleEvent process(MuleEvent event) throws MuleException
        {
            return processNext(new StringAppendTransformer("InterceptingMessageProcessor").process(event));
        }
View Full Code Here

    @Test
    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());
    }
View Full Code Here

    @Test
    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());
    }
View Full Code Here

    @Test
    public void testResponseAdaptorNestedChain() throws MuleException, Exception
    {
        DefaultMessageProcessorChainBuilder builder = new DefaultMessageProcessorChainBuilder();
        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());
    }
View Full Code Here

    @Test
    public void testResponseAdaptorNestedChainReturnsNull() throws MuleException, Exception
    {
        DefaultMessageProcessorChainBuilder builder = new DefaultMessageProcessorChainBuilder();
        builder.chain(
            new StringAppendTransformer("1"),
            new ResponseMessageProcessorAdapter(new DefaultMessageProcessorChainBuilder().chain(
                new StringAppendTransformer("a"), new StringAppendTransformer("b"), new ReturnNullMP())
                .build()), new StringAppendTransformer("2"));
        assertEquals("012", builder.build().process(getTestEventUsingFlow("0")).getMessageAsString());
    }
View Full Code Here

TOP

Related Classes of org.mule.transformer.simple.StringAppendTransformer

Copyright © 2018 www.massapicom. 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.