Package org.mule.routing

Examples of org.mule.routing.MessageProcessorFilterPair


                throw new IllegalArgumentException(
                    "MessageProcessorBuilder should only have MessageProcessor's or MessageProcessorBuilder's configured");
            }
        }
        return filter == null
                             ? new MessageProcessorFilterPair(builder.build(), AcceptAllFilter.INSTANCE)
                             : new MessageProcessorFilterPair(builder.build(), filter);
    }
View Full Code Here


    private MessageProcessorFilterPair createFilterPair(MessageProcessorChainBuilder builder) throws Exception
    {
        if (filter == null)
        {
            return new MessageProcessorFilterPair(builder.build(), AcceptAllFilter.INSTANCE);
        }
        else
        {
            return new MessageProcessorFilterPair(builder.build(), filter);
        }
    }
View Full Code Here

     */
    @Test
    public void filterReferenceShouldCreateFilterWithRegexFilterAndOutboundEndpointChain()
    {
        ChoiceRouter router = findChoiceRouterInFlow("without-default-route");
        MessageProcessorFilterPair pair = router.getConditionalMessageProcessors().get(0);
        assertIsRegExFilterWithPattern(pair.getFilter(), "apple");
        assertMessageChainIsOutboundEndpoint(pair.getMessageProcessor(), "vm://fruit-channel.in");
    }
View Full Code Here

    @Test
    public void embeddedFilterShouldCreatePairWithFilterAndOtherConfiguredMPsAsChain()
    {
        ChoiceRouter router = findChoiceRouterInFlow("with-default-route");

        MessageProcessorFilterPair firstPair = router.getConditionalMessageProcessors().get(0);
        assertIsRegExFilterWithPattern(firstPair.getFilter(), "apple");
        assertMessageChainIsOutboundEndpoint(firstPair.getMessageProcessor(), "vm://fruit-channel.in");

        MessageProcessorFilterPair secondPair = router.getConditionalMessageProcessors().get(1);
        assertIsRegExFilterWithPattern(secondPair.getFilter(), "turnip");
        assertMessageChainIsOutboundEndpoint(secondPair.getMessageProcessor(), "vm://veggie-channel.in");

        MessageProcessorFilterPair thirdPair = router.getConditionalMessageProcessors().get(2);
        assertIsExpressionFilterWithExpressionAndEvaluator(thirdPair.getFilter(), ".*berry", "regex");
        assertMessageChainIsOutboundEndpoint(thirdPair.getMessageProcessor(), "vm://fruit-channel.in");
    }
View Full Code Here

TOP

Related Classes of org.mule.routing.MessageProcessorFilterPair

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.