public class DynamicFirstSuccessful extends Object implements MessageProcessor, Initialisable, MuleContextAware
DynamicRouteResolver.
The message will be route to the first route, if the route execution is successful then
execution ends, if not the message will be route to the next route. This continues until a
successful route is found.PHASE_NAME| Constructor and Description |
|---|
DynamicFirstSuccessful() |
| Modifier and Type | Method and Description |
|---|---|
void |
initialise()
Method used to perform any initialisation work.
|
MuleEvent |
process(MuleEvent event)
Invokes the MessageProcessor.
|
void |
setDynamicRouteResolver(DynamicRouteResolver dynamicRouteResolver) |
void |
setFailureExpression(String failureExpression)
Specifies an expression that when evaluated as determines if the processing of
one a route was a failure or not.
|
void |
setMuleContext(MuleContext context) |
public MuleEvent process(MuleEvent event) throws MuleException
MessageProcessorprocess in interface MessageProcessorevent - MuleEvent to be processedMuleExceptionpublic void initialise()
throws InitialisationException
InitialisableInitialisationException should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.initialise in interface InitialisableInitialisationException - if a fatal error occurs causing the Mule instance to shutdownRecoverableException - if an error occurs that can be recovered frompublic void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwarepublic void setFailureExpression(String failureExpression)
failureExpression - ExpressionFilterpublic void setDynamicRouteResolver(DynamicRouteResolver dynamicRouteResolver)
dynamicRouteResolver - custom route resolver to useCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.