Package org.mule

Examples of org.mule.DefaultMuleEvent$NullInboundEndpoint


        ir.setFlowConstruct(service);
        ir.setThrowOnUnaccepted(false);

        MuleMessage okMessage = new DefaultMuleMessage("OK", muleContext);
        okMessage.setOutboundProperty("id", "1");
        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 ID is a duplicate
        okMessage = new DefaultMuleMessage("OK", muleContext);
        okMessage.setOutboundProperty("id", "1");
        event = new DefaultMuleEvent(okMessage, endpoint1, (MuleSession) session.proxy());
        event = ir.process(event);
        assertNull(event);
    }
View Full Code Here


        {
            payload.add(msg.getPayload());
        }

        DefaultMuleMessage listMessage = new DefaultMuleMessage(payload, msg, msg.getMuleContext());
        return new DefaultMuleEvent(listMessage, event);
    }
View Full Code Here

                }
            }
            aggregate = coll;
        }

        return aggregate == null ? null : new DefaultMuleEvent(aggregate, previous);
    }
View Full Code Here

        MessageProcessor nullEventMp = new MessageProcessor()
        {
            @Override
            public MuleEvent process(MuleEvent event) throws MuleException
            {
                return new DefaultMuleEvent(null, event);
            }
        };
        FirstSuccessful fs = createFirstSuccessfulRouter(nullEventMp);
        fs.initialise();
View Full Code Here

    private String getPayload(MessageProcessor mp, MuleSession session, String message) throws Exception
    {
        MuleMessage msg = new DefaultMuleMessage(message, muleContext);
        try
        {
            MuleEvent event = mp.process(new DefaultMuleEvent(msg, MessageExchangePattern.REQUEST_RESPONSE, session));
            MuleMessage returnedMessage = event.getMessage();
            if (returnedMessage.getExceptionPayload() != null)
            {
                return EXCEPTION_SEEN;
            }
View Full Code Here

                }
                else
                {
                    msg = new DefaultMuleMessage("No " + rejectIfMatches, muleContext);
                }
                return new DefaultMuleEvent(msg, MessageExchangePattern.ONE_WAY, event.getSession());
            }
            catch (Exception e)
            {
                throw new DefaultMuleException(e);
            }
View Full Code Here

            for (String s : attachments.keySet())
            {
                message.addOutboundAttachment(s, attachments.get(s));
            }
        }
        return new DefaultMuleEventContext(new DefaultMuleEvent(message, getTestInboundEndpoint("null"), new DefaultMuleSession(muleContext)));
    }
View Full Code Here

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

        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 result = router.process(event3);
View Full Code Here

                        {
                            throw new AggregationException(events, next, e);
                        }
                    }

                    return new DefaultMuleEvent(new DefaultMuleMessage(newPayload.toString(), muleContext),
                        events.getMessageCollectionEvent());
                }
            };
        }
View Full Code Here

    public MuleEvent aggregateEvents(EventGroup events) throws AggregationException
    {
        MuleEvent[] results = (events == null) ? new MuleEvent[0] : events.toArray();
        Arrays.sort(results, eventComparator);
        //This is a bit of a hack since we return a collection of events on one message
        return new DefaultMuleEvent(new DefaultMuleMessage(results, muleContext), results[0]);
    }
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.