org.mule.routing
Class FirstSuccessful
java.lang.Object
org.mule.routing.outbound.AbstractOutboundRouter
org.mule.routing.FirstSuccessful
- All Implemented Interfaces:
- FlowConstructAware, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, MessageProcessor, MessageRouter, Matchable, MatchableMessageProcessor, MatchableMessageRouter, OutboundRouter, RouterStatisticsRecorder
public class FirstSuccessful
- extends AbstractOutboundRouter
- implements MessageProcessor
FirstSuccessful routes an event to the first target route that can accept it without throwing or returning an
exception. If no such route can be found, an exception is thrown. Note that this works more reliable with
synchronous targets, but no such restriction is imposed.
| Fields inherited from class org.mule.routing.outbound.AbstractOutboundRouter |
enableCorrelation, flowConstruct, initialised, logger, magicProperties, muleContext, replyTo, resultsHandler, routes, started, transactionConfig |
| Methods inherited from class org.mule.routing.outbound.AbstractOutboundRouter |
addRoute, dispose, getEnableCorrelation, getMuleContext, getReplyTo, getResultsHandler, getRoute, getRouterStatistics, getRoutes, getTransactionConfig, initialise, isDynamicRoutes, process, propagateMagicProperties, removeRoute, sendRequest, sendRequestEvent, setEnableCorrelation, setEnableCorrelationAsString, setFlowConstruct, setMessageProcessors, setMessageProperties, setMuleContext, 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 |
FirstSuccessful
public FirstSuccessful()
route
public MuleEvent route(MuleEvent event)
throws MessagingException
- Route the given event to one of our targets
- Specified by:
route in class AbstractOutboundRouter
- Throws:
MessagingException
isMatch
public boolean isMatch(MuleMessage message)
throws MuleException
- Description copied from interface:
Matchable
- Determines if the event should be processed
- Specified by:
isMatch in interface Matchable
- Returns:
- true if the event should be processed by this router
- Throws:
MuleException - if the event cannot be evaluated
Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.