org.mule.routing.outbound
Class ExceptionBasedRouter
java.lang.Object
org.mule.processor.AbstractMuleObjectOwner<MessageProcessor>
org.mule.processor.AbstractMessageProcessorOwner
org.mule.routing.outbound.AbstractOutboundRouter
org.mule.routing.outbound.FilteringOutboundRouter
org.mule.routing.outbound.AbstractRecipientList
org.mule.routing.outbound.ExpressionRecipientList
org.mule.routing.outbound.ExceptionBasedRouter
- All Implemented Interfaces:
- AnnotatedObject, FlowConstructAware, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, MessageProcessor, MessageRouter, Matchable, MatchableMessageProcessor, MatchableMessageRouter, OutboundRouter, RouterStatisticsRecorder, TransformingMatchable
public class ExceptionBasedRouter
- extends ExpressionRecipientList
ExceptionBasedRouter
Will send the current event to the first
endpoint that doesn't throw an exception. If all attempted targets fail then an
exception is thrown.
The router will override the sync/async mode of the
endpoint and force the sync mode for all targets except the last one.
Methods inherited from class org.mule.routing.outbound.FilteringOutboundRouter |
addRoute, getFilter, getRoute, getTransformers, initialise, isMatch, isTransformBeforeMatch, isUseTemplates, setFilter, setTransformers, setUseTemplates |
Methods inherited from class org.mule.routing.outbound.AbstractOutboundRouter |
cloneMessage, createEventToRoute, dispose, getEnableCorrelation, getMuleContext, getOwnedMessageProcessors, getReplyTo, getResultsHandler, getRoute, getRouterStatistics, getRoutes, getTransactionConfig, process, propagateMagicProperties, removeRoute, sendRequest, sendRequestEvent, setEnableCorrelation, setEnableCorrelationAsString, setMessageProcessors, setMessageProperties, setReplyTo, setResultsHandler, setRouterStatistics, setRoutes, setTransactionConfig, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExceptionBasedRouter
public ExceptionBasedRouter()
route
public MuleEvent route(MuleEvent event)
throws RoutingException
- Overrides:
route
in class AbstractRecipientList
- Throws:
RoutingException
exceptionPayloadAvailable
protected boolean exceptionPayloadAvailable(MuleMessage message)
- Parameters:
message
- message to check
- Returns:
- true if there was an exception payload set
Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.