Package org.mule

Examples of org.mule.DefaultMuleEvent$NullInboundEndpoint


        Service fc = getTestService();
        MuleSession session = getTestSession(fc, muleContext);
        MuleMessage toSplit = new DefaultMuleMessage(payload, new HashMap<String, Object>(), new HashMap<String, Object>(), null, muleContext);
        CollectionSplitter splitter = new CollectionSplitter();
        splitter.setMuleContext(muleContext);
        DefaultMuleEvent event = new DefaultMuleEvent(toSplit, getTestInboundEndpoint("ep"), session);
        assertNull(splitter.process(event));
    }
View Full Code Here


        }
        CollectionSplitter splitter = new CollectionSplitter();
        splitter.setMuleContext(muleContext);
        Grabber grabber = new Grabber();
        splitter.setListener(grabber);
        DefaultMuleEvent event = new DefaultMuleEvent(toSplit, getTestInboundEndpoint("ep"), session);
        splitter.process(event);
        List<MuleMessage> splits =  grabber.getMessages();
        assertEquals(count, splits.size());
        Set actualSequences = new HashSet();
        for (MuleMessage msg : splits)
View Full Code Here

        props.put("number", 1);
        props.put("string", "hello");
        testObject = new DefaultMuleMessage("test", props, muleContext);
       
        RequestContext.setEvent(
                new DefaultMuleEvent(testObject, getTestInboundEndpoint("test"),
                MuleTestUtils.getTestSession(muleContext)));
    }
View Full Code Here

        //TODO should probably cache this
        EndpointBuilder endpointBuilder = muleContext.getEndpointFactory().getEndpointBuilder(endpoint);
        endpointBuilder.setExchangePattern(exchangePattern);
        OutboundEndpoint ep = endpointBuilder.buildOutboundEndpoint();
      
        DefaultMuleEvent event = new DefaultMuleEvent(message, ep.getExchangePattern(),
            new DefaultMuleSession(flowConstruct, muleContext));

        RequestContext.setEvent(event);
        MuleEvent resultEvent = ep.process(event);
       
View Full Code Here

    }
   
    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 messageProcessorChain.process(newEvent);
        }
View Full Code Here

        }
        else
        {
            session = new DefaultMuleSession(flowConstruct, connector.getMuleContext());
        }
        return new DefaultMuleEvent(message, getEndpoint(), session, ros);
    }
View Full Code Here

        DefaultMessageCollection collection = new DefaultMessageCollection(muleContext);
        collection.addMessage(new DefaultMuleMessage(Arrays.asList("1", "2", "3"), muleContext));
        collection.addMessage(new DefaultMuleMessage("4", muleContext));
        collection.addMessage(new DefaultMuleMessage(Arrays.asList("5", "6", "7"), muleContext));
       
        event = new DefaultMuleEvent(collection, event);
       
        MuleEvent response = merger.process(event);
       
        assertFalse(response.getMessage() instanceof MuleMessageCollection);
       
View Full Code Here

        message.addProperties(messageProperties, PropertyScope.INBOUND);
        message.addProperties(messageProperties, PropertyScope.INVOCATION);

        // Use an endpoint cache to prevent memory leaks (see MULE-5422)
        OutboundEndpoint ep = endpointCache.getOutboundEndpoint(endpoint, exchangePattern, null);
        DefaultMuleEvent event = new DefaultMuleEvent(message, ep.getExchangePattern(),
            new DefaultMuleSession(flowConstruct, muleContext));
        RequestContext.setEvent(event);

        // Set correlation properties in SESSION scope so that they get propagated to response messages.
        if (messageProperties.get(PROPERTY_PROCESS_TYPE) != null)
        {
            event.getMessage().setSessionProperty(PROPERTY_PROCESS_TYPE, messageProperties.get(PROPERTY_PROCESS_TYPE));
        }
        if (messageProperties.get(PROPERTY_PROCESS_ID) != null)
        {
            event.getMessage().setSessionProperty(PROPERTY_PROCESS_ID, messageProperties.get(PROPERTY_PROCESS_ID));
        }
       
        MuleEvent resultEvent = ep.process(event);
       
        MuleMessage response = null;
View Full Code Here

        //muleContext.getRegistry().registerComponent(service);

        MuleMessage message = new DefaultMuleMessage(MESSAGE, muleContext);
        message.setOutboundProperty(MailProperties.TO_ADDRESSES_PROPERTY, EMAIL);
        MuleSession session = getTestSession(getTestService("apple", Apple.class), muleContext);
        DefaultMuleEvent event = new DefaultMuleEvent(message, MessageExchangePattern.ONE_WAY, session,
            new ResponseOutputStream(System.out));
        endpoint.process(event);

        getServers().waitForIncomingEmail(AbstractEmailFunctionalTestCase.DELIVERY_DELAY_MS, 1);
        MimeMessage[] messages = getServers().getReceivedMessages();
View Full Code Here

                // concrete
                // message splitter implementations
                message.setCorrelationGroupSize(count);
                message.setCorrelationSequence(correlationSequence);
            }
            resultEvents.add(processNext(new DefaultMuleEvent(message, event)));
        }
        if (correlationSequence == 1)
        {
            logger.warn("Splitter only returned a single result. If this is not expected, please check your split expression");
        }
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.