Package org.mule

Examples of org.mule.DefaultMuleEvent$NullInboundEndpoint


        }

        public MuleEvent process(MuleEvent event) throws MuleException
        {
            this.event = event;
            MuleEvent result = new DefaultMuleEvent(new DefaultMuleMessage(event.getMessageAsString() + appendString,
                muleContext), event);
            this.resultEvent = result;
            return result;
        }
View Full Code Here


            if (stopProcessing)
            {
                return event;
            }

            MuleEvent intermediateEvent = new DefaultMuleEvent(new DefaultMuleMessage(
                event.getMessageAsString() + "before" + appendString, muleContext), event);
            if (next != null)
            {
                intermediateEvent = next.process(intermediateEvent);
            }
            if (intermediateEvent != null)
            {
                return new DefaultMuleEvent(new DefaultMuleMessage(intermediateEvent.getMessageAsString()
                                                                   + "after" + appendString, muleContext),
                    intermediateEvent);
            }
            else
            {
View Full Code Here

            // request to the response message I think this could be done without the
            // performance hit. Or we could provide a way to set the request message
            // as
            // the OriginalAdapter on the message And provide access to the request
            // properties that way
            return new DefaultMuleEvent(OptimizedRequestContext.unsafeRewriteEvent(event.getMessage()), event);
        }
        else
        {
            return null;
        }
View Full Code Here

        mp.setListener(new MessageProcessor()
        {
            public MuleEvent process(MuleEvent event) throws MuleException
            {
                // return event with same payload but no properties
                return new DefaultMuleEvent(new DefaultMuleMessage(event.getMessage().getPayload(),
                    muleContext), MessageExchangePattern.REQUEST_RESPONSE, null);
            }
        });

        MuleEvent event = createTestOutboundEvent();
View Full Code Here

    private String testProperty;

    @Override
    protected MuleEvent aggregateEvents(EventGroup events) throws AggregationException
    {
        return new DefaultMuleEvent(new DefaultMuleMessage("test", events.toMessageCollection()
            .getMuleContext()), events.getMessageCollectionEvent());
    }
View Full Code Here

        final MuleSession session = getTestSession(flowConstruct, context);

        final MuleMessageFactory factory = endpoint.getConnector().createMuleMessageFactory();
        final MuleMessage message = factory.create(data, endpoint.getEncoding());

        return new DefaultMuleEvent(message, endpoint, session);
    }
View Full Code Here

        final InboundEndpoint endpoint = getTestInboundEndpoint("test1",
            MessageExchangePattern.REQUEST_RESPONSE, context, null);
        final MuleMessageFactory factory = endpoint.getConnector().createMuleMessageFactory();
        final MuleMessage message = factory.create(data, endpoint.getEncoding());

        return new DefaultMuleEvent(message, endpoint, session);
    }
View Full Code Here

    protected MuleEvent createTestInboundEvent(InboundEndpoint endpoint) throws Exception
    {
        Map<String, Object> props = new HashMap<String, Object>();
        props.put("prop1", "value1");
        return new DefaultMuleEvent(new DefaultMuleMessage(TEST_MESSAGE, props, muleContext), endpoint,
            getTestSession(getTestService(), muleContext));
    }
View Full Code Here

        Service svc = getTestService();
        if (exceptionListener != null)
        {
            svc.setExceptionListener(exceptionListener);
        }
        return new DefaultMuleEvent(new DefaultMuleMessage(TEST_MESSAGE, props, muleContext), getTestInboundEndpoint(MessageExchangePattern.REQUEST_RESPONSE), getTestSession(svc, muleContext));
    }
View Full Code Here

        for (int i = 0; i < iterations; i++)
        {
            MuleMessage msg = new DefaultMuleMessage("testPayload", muleContext);
            msg.addOutboundAttachment("testAttachment", new DataHandler(new StringDataSource("foo")));
            DefaultMuleSession session = new DefaultMuleSession(msg, ((AbstractConnector) ep.getConnector()).getSessionHandler(), muleContext);
            DefaultMuleEvent event = new DefaultMuleEvent(msg, getTestInboundEndpoint("test://test"), session);
            MuleMessage result = client.process(event).getMessage();
            assertNotNull(result);
            assertNotNull(result.getPayload());
            assertEquals(result.getPayloadAsString(), "Done");
            callbackCount++;
View Full Code Here

TOP

Related Classes of org.mule.DefaultMuleEvent$NullInboundEndpoint

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.