Package org.mule

Examples of org.mule.DefaultMuleEvent$NullInboundEndpoint


        {
            throw new IllegalArgumentException(CoreMessages.cannotFindBindingForMethod(method.getName()).toString());
        }

        MuleEvent currentEvent = RequestContext.getEvent();
        MuleEvent replyEvent = router.process(new DefaultMuleEvent(message,currentEvent));

        if (replyEvent != null && replyEvent.getMessage()!=null)
        {
            MuleMessage reply = replyEvent.getMessage();
            if (reply.getExceptionPayload() != null)
View Full Code Here


        MessageProcessor processor = lookupMessageProcessor(processorName, muleContext);

        try
        {
            return processor.process(new DefaultMuleEvent(messageToProcess, RequestContext.getEvent()))
                .getMessage();
        }
        catch (MuleException e)
        {
            throw new ExpressionRuntimeException(
View Full Code Here

        {
            results = events.toArray();
            Arrays.sort(results, eventComparator);
        }
        //This is a bit of a hack since we wrap the the collection of events in a Mule Message to pass back
        return new DefaultMuleEvent(new DefaultMuleMessage(results, muleContext), results[0]);
    }
View Full Code Here

    public MuleEvent getMessageCollectionEvent()
    {
        if (events.size() > 0)
        {

            return new DefaultMuleEvent(toMessageCollection(), events.get(0));
        }
        else
        {
            return null;
        }
View Full Code Here

                    }

                    message.setCorrelationGroupSize(-1);
                    message.setCorrelationSequence(-1);

                    return new DefaultMuleEvent(message, firstEvent);
                }
                catch (Exception e)
                {
                    throw new AggregationException(events,MessageChunkAggregator.this, e);
                }
View Full Code Here

        IdempotentSecureHashMessageFilter ir = new IdempotentSecureHashMessageFilter();
        ir.setFlowConstruct(service);
        ir.setThrowOnUnaccepted(false);

        MuleMessage okMessage = new DefaultMuleMessage("OK", muleContext);
        MuleEvent event = new DefaultMuleEvent(okMessage, endpoint1, (MuleSession) session.proxy());

        // This one will process the event on the target endpoint
        event = ir.process(event);
        assertNotNull(event);

         // This will not process, because the message is a duplicate
        okMessage = new DefaultMuleMessage("OK", muleContext);
        event = new DefaultMuleEvent(okMessage, endpoint1, (MuleSession) session.proxy());
        event = ir.process(event);
        assertNull(event);

        // This will process, because the message  is not a duplicate
        okMessage = new DefaultMuleMessage("Not OK", muleContext);
        event = new DefaultMuleEvent(okMessage, endpoint1, (MuleSession) session.proxy());
        event = ir.process(event);
        assertNotNull(event);
    }
View Full Code Here

            trans = TransformerUtils.getTransformers(transformers, muleContext);
        }

        MuleSession session = new DefaultMuleSession(service, muleContext);
        InboundEndpoint endpoint = getDefaultClientEndpoint(service, message.getPayload(), true);
        MuleEvent event = new DefaultMuleEvent(message, endpoint, session);

        if (logger.isDebugEnabled())
        {
            logger.debug("MuleClient sending event direct to: " + componentName + ". MuleEvent is: " + event);
        }
View Full Code Here

        message2.setCorrelationId(message1.getUniqueId());
        message3.setCorrelationId(message1.getUniqueId());
        message1.setCorrelationGroupSize(3);

        InboundEndpoint endpoint = MuleTestUtils.getTestInboundEndpoint(MessageExchangePattern.ONE_WAY, muleContext);
        MuleEvent event1 = new DefaultMuleEvent(message1, endpoint, session);
        MuleEvent event2 = new DefaultMuleEvent(message2, endpoint, session);
        MuleEvent event3 = new DefaultMuleEvent(message3, endpoint, session);

        assertNull(router.process(event1));
        assertNull(router.process(event2));
        MuleEvent resultEvent = router.process(event3);
        assertNotNull(resultEvent);
View Full Code Here

            this.appendString = appendString;
        }

        public MuleEvent process(MuleEvent event) throws MuleException
        {
            return processNext(new DefaultMuleEvent(new DefaultMuleMessage(event.getMessage().getPayload()
                                                                           + appendString, ServiceCompositeMessageSourceTestCase.muleContext),
                event));
        }
View Full Code Here

        public void run()
        {
            for (int i = 0; i < numMessages; i++)
            {
                MuleMessage msg = new DefaultMuleMessage(TEST_MESSAGE + messageNumber.getAndIncrement(), muleContext);
                MuleEvent event = new DefaultMuleEvent(msg, MessageExchangePattern.REQUEST_RESPONSE, session);
                try
                {
                    target.process(event);
                }
                catch (MuleException e)
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.