public class ExceptionBasedRouter extends FilteringOutboundRouter
ExceptionBasedRouter Will send the current event to the first
endpoint that doesn't throw an exception. If all attempted endpoints fail then an
exception is thrown. The router will override the sync/async mode of the
endpoint and force the sync mode for all endpoints except the last one.
remoteSync is also enforced.ENABLE_CORRELATION_ALWAYS, ENABLE_CORRELATION_IF_NOT_SET, ENABLE_CORRELATION_NEVER, enableCorrelation, endpoints, logger, messageInfoMapping, replyTo, transactionConfigmuleContextPHASE_NAMEPHASE_NAME| Constructor and Description |
|---|
ExceptionBasedRouter() |
| Modifier and Type | Method and Description |
|---|---|
protected TransactionTemplate |
createTransactionTemplate(MuleSession session,
ImmutableEndpoint endpoint) |
protected boolean |
exceptionPayloadAvailable(MuleMessage message) |
MuleMessage |
route(MuleMessage message,
MuleSession session,
boolean synchronous)
This method is responsible for routing the Message via the MuleSession.
|
addEndpoint, getEndpoint, getFilter, getTransformers, isMatch, isUseTemplates, setFilter, setTransformers, setUseTemplatesdispatch, getEnableCorrelation, getEndpoint, getEndpoints, getMessageInfoMapping, getReplyTo, getTransactionConfig, isDynamicEndpoints, removeEndpoint, send, setEnableCorrelation, setEnableCorrelationAsString, setEndpoints, setMessageInfoMapping, setMessageProperties, setReplyTo, setTransactionConfigdispose, getMuleContext, getRouterStatistics, initialise, setMuleContext, setRouterStatisticsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRouterStatistics, setRouterStatisticsinitialisedisposepublic MuleMessage route(MuleMessage message, MuleSession session, boolean synchronous) throws RoutingException
OutboundRouterroute in interface OutboundRouterroute in class FilteringOutboundRoutermessage - the message to send via one or more endpoints on this routersession - the session used to actually send the eventsynchronous - whether the invocation process should be synchronous or notRoutingExceptionFilteringOutboundRouter,
ExceptionBasedRouter,
MulticastingRouterprotected boolean exceptionPayloadAvailable(MuleMessage message)
message - message to checkprotected TransactionTemplate createTransactionTemplate(MuleSession session, ImmutableEndpoint endpoint)
createTransactionTemplate in class AbstractOutboundRouterCopyright © 2003-2012 MuleSource, Inc.. All Rights Reserved.