Examples of SensingNullMessageProcessor


Examples of org.mule.tck.SensingNullMessageProcessor

    }

    @Test
    public void testFilterFailUnacceptedMP() throws Exception
    {
        SensingNullMessageProcessor unaccepted = getSensingNullMessageProcessor();
        MessageFilter mp = new MessageFilter(new EqualsFilter(null), false, unaccepted);
        SensingNullMessageProcessor out = getSensingNullMessageProcessor();
        mp.setListener(out);

        MuleEvent inEvent = getTestEvent(TEST_MESSAGE, MessageExchangePattern.ONE_WAY);

        MuleEvent resultEvent = mp.process(inEvent);
View Full Code Here

Examples of org.mule.tck.SensingNullMessageProcessor

    @Test
    public void testSingleEventNoTimeout() throws Exception
    {
        asyncReplyMP = new TestAsyncRequestReplyRequester(muleContext);
        SensingNullMessageProcessor target = getSensingNullMessageProcessor();

        asyncReplyMP.setListener(target);
        asyncReplyMP.setReplySource(target.getMessageSource());

        MuleEvent event = getTestEvent(TEST_MESSAGE, getTestService());

        MuleEvent resultEvent = asyncReplyMP.process(event);
View Full Code Here

Examples of org.mule.tck.SensingNullMessageProcessor

    @Test
    public void testSingleEventNoTimeoutAsync() throws Exception
    {
        asyncReplyMP = new TestAsyncRequestReplyRequester(muleContext);
        SensingNullMessageProcessor target = getSensingNullMessageProcessor();
        LaxAsyncInterceptingMessageProcessor asyncMP = new LaxAsyncInterceptingMessageProcessor(
            new WorkManagerSource()
            {
                public WorkManager getWorkManager() throws MuleException
                {
                    return muleContext.getWorkManager();
                }
            }
        );

        asyncMP.setListener(target);
        asyncReplyMP.setListener(asyncMP);
        asyncReplyMP.setReplySource(target.getMessageSource());

        MuleEvent event = getTestEvent(TEST_MESSAGE, getTestService(),
            getTestInboundEndpoint(MessageExchangePattern.ONE_WAY));

        MuleEvent resultEvent = asyncReplyMP.process(event);
View Full Code Here

Examples of org.mule.tck.SensingNullMessageProcessor

    @Test
    public void testSingleEventTimeout() throws Exception
    {
        asyncReplyMP = new TestAsyncRequestReplyRequester(muleContext);
        asyncReplyMP.setTimeout(1);
        SensingNullMessageProcessor target = getSensingNullMessageProcessor();
        target.setWaitTime(3000);
        LaxAsyncInterceptingMessageProcessor asyncMP = new LaxAsyncInterceptingMessageProcessor(
            new WorkManagerSource()
            {

                public WorkManager getWorkManager() throws MuleException
                {
                    return muleContext.getWorkManager();
                }
            }
        );

        asyncMP.setListener(target);
        asyncReplyMP.setListener(asyncMP);
        asyncReplyMP.setReplySource(target.getMessageSource());

        MuleEvent event = getTestEvent(TEST_MESSAGE, getTestService(),
            getTestInboundEndpoint(MessageExchangePattern.ONE_WAY));

        try
View Full Code Here

Examples of org.mule.tck.SensingNullMessageProcessor

    @Test
    public void testMultiple() throws Exception
    {
        asyncReplyMP = new TestAsyncRequestReplyRequester(muleContext);
        SensingNullMessageProcessor target = getSensingNullMessageProcessor();
        target.setWaitTime(50);
        LaxAsyncInterceptingMessageProcessor asyncMP = new LaxAsyncInterceptingMessageProcessor(
            new WorkManagerSource()
            {

                public WorkManager getWorkManager() throws MuleException
                {
                    return muleContext.getWorkManager();
                }
            }
        );

        asyncMP.setListener(target);
        asyncReplyMP.setListener(asyncMP);
        asyncReplyMP.setReplySource(target.getMessageSource());

        final InboundEndpoint inboundEndpoint = getTestInboundEndpoint(MessageExchangePattern.ONE_WAY);
        final Service service = getTestService();

        final AtomicInteger count = new AtomicInteger();
View Full Code Here

Examples of org.mule.tck.SensingNullMessageProcessor

            {
                return null;
            }
        });

        SensingNullMessageProcessor flow = getSensingNullMessageProcessor();
        receiver.setListener(flow);

        receiver.poll();

        assertNull(flow.event);
View Full Code Here

Examples of org.mule.tck.SensingNullMessageProcessor

                return new DefaultMuleEvent(new DefaultMuleMessage(NullPayload.getInstance(), muleContext),
                    event);
            }
        });

        SensingNullMessageProcessor flow = getSensingNullMessageProcessor();
        receiver.setListener(flow);

        receiver.poll();

        assertNull(flow.event);
View Full Code Here

Examples of org.mule.tck.SensingNullMessageProcessor

            {
                return new DefaultMuleEvent(new DefaultMuleMessage("", muleContext), event);
            }
        });

        SensingNullMessageProcessor flow = getSensingNullMessageProcessor();
        receiver.setListener(flow);

        receiver.poll();

        assertNotNull(flow.event);
View Full Code Here

Examples of org.mule.tck.SensingNullMessageProcessor

            final MuleMessage message = event.getMessage();
            final String id = message.getUniqueId();
            message.setCorrelationId(id);
            message.setCorrelationGroupSize(1);

            SensingNullMessageProcessor listener = getSensingNullMessageProcessor();
            mp.setListener(listener);
            mp.setReplySource(listener.getMessageSource());

            mp.process(event);

            Map<String, MuleEvent> responseEvents = mp.getResponseEvents();
            assertTrue("Response events should be cleaned up.", responseEvents.isEmpty());
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.