Package org.mule

Examples of org.mule.DefaultMuleEvent$NullInboundEndpoint


    @Override
    public MuleEvent process(MuleEvent event) throws MuleException
    {
        MuleSession calledSession = new DefaultMuleSession(event.getSession(), this);
        MuleEvent newEvent = new DefaultMuleEvent(event.getMessage(), event.getEndpoint(), event,
            calledSession);
        RequestContext.setEvent(newEvent);
        try
        {
            return pipeline.process(newEvent);
View Full Code Here


        if(session==null)
        {
            session = new DefaultMuleSession(flow, message.getMuleContext());
        }

        MuleEvent result = process(new DefaultMuleEvent(message, endpoint.getExchangePattern(), session));
        if (result != null)
        {
            return result.getMessage();
        }
        else
View Full Code Here

        assertTrue(router.isMatch(message));

        final MuleSession session = (MuleSession)mockSession.proxy();
        // exception to throw
        MuleEvent eventToThrow = new DefaultMuleEvent(message, MessageExchangePattern.ONE_WAY, session);
        MuleException rex = new RoutingException(eventToThrow, endpoint1);

        mockendpoint1.expectAndThrow("process", RouterTestUtils.getArgListCheckerMuleEvent(), rex);
        mockendpoint2.expectAndReturn("process", RouterTestUtils.getArgListCheckerMuleEvent(), event);
        MuleEvent actualResult = router.route(new OutboundRoutingTestEvent(message, session, muleContext));
View Full Code Here

        // Create a new copy of the message so that response MessageProcessors don't end up screwing up the reply
        returnMessage = new DefaultMuleMessage(returnMessage.getPayload(), returnMessage, muleContext);

        // Create the replyTo event asynchronous
        MuleEvent replyToEvent = new DefaultMuleEvent(returnMessage, event.getEndpoint(), event.getSession(), event.getProcessingTime());

        // carry over properties
        List<String> responseProperties = endpoint.getResponseProperties();
        for (String propertyName : responseProperties)
        {
            Object propertyValue = event.getMessage().getInboundProperty(propertyName);
            if (propertyValue != null)
            {
                replyToEvent.getMessage().setOutboundProperty(propertyName, propertyValue);
            }
        }

        // dispatch the event
        try
View Full Code Here

        if (sourceMessageProcessor instanceof ImmutableEndpoint)
        {
            ep = (ImmutableEndpoint) sourceMessageProcessor;
        }

        MuleEvent event = new DefaultMuleEvent(request, ep.getExchangePattern(), new DefaultMuleSession(
            flowConstruct, connector.getMuleContext()));

        MuleEvent sourceEvent = sourceMessageProcessor.process(event);
        if (sourceEvent != null)
        {
View Full Code Here

            muleContext.getEndpointFactory().getOutboundEndpoint(endpointBuilder);

        MuleMessage message = new DefaultMuleMessage("test1", muleContext);
        MuleSession session = new DefaultMuleSession(message,
            ((AbstractConnector) endpoint.getConnector()).getSessionHandler(), muleContext);
        MuleEvent event = new DefaultMuleEvent(message, endpoint.getExchangePattern(), session);
        MuleMessage reply = endpoint.process(event).getMessage();

        assertNotNull(reply);

        Document response = (Document) reply.getPayload();
View Full Code Here

            String url = setupURL(message);
           
            try
            {
                ep = getEndpoint(muleContext, url);
                event = new DefaultMuleEvent(muleMsg, ep.getExchangePattern(), session);
            }
            catch (Exception e)
            {
                throw new Fault(e);
            }
View Full Code Here

            if (forceSync || hasResponse || isTransacted)           
            {
                MuleMessage resultMessage = doSend(event);
                if (hasResponse && resultMessage != null)
                {
                    resultEvent = new DefaultMuleEvent(resultMessage, event);
                    // TODO It seems like this should go here but it causes unwanted behaviour and breaks test cases.
                    //if (!disableTransportTransformer)
                    //{
                    //    applyResponseTransformers(resultEvent);           
                    //}
View Full Code Here

        request.setOutboundProperty(HttpConnector.HTTP_METHOD_PROPERTY, "GET");

        MuleSession session = new DefaultMuleSession(flowConstruct, connector.getMuleContext());


        MuleEvent event = new DefaultMuleEvent(request, outboundEndpoint.getExchangePattern(), session);

        MuleEvent result = outboundEndpoint.process(event);
        MuleMessage message = null;
        if (result != null)
        {
View Full Code Here

    /**
     * Create a new event to be routed to the target MP
     */
    protected MuleEvent createEventToRoute(MuleEvent routedEvent, MuleMessage message, MessageProcessor route)
    {
        MuleEvent event = new DefaultMuleEvent(message, routedEvent.getEndpoint(), routedEvent.getSession(), routedEvent.getProcessingTime());
        return event;
    }
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.