Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.routing
Class FirstSuccessful

    java.lang.Object
      org.mule.processor.AbstractMessageProcessorOwner
          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

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.

Field Summary
`protected String` | `failureExpression`
`protected ExpressionFilter` | `failureExpressionFilter`

Fields inherited from class org.mule.routing.outbound.AbstractOutboundRouter
`enableCorrelation, initialised, logger, magicProperties, replyTo, resultsHandler, routes, started, transactionConfig`

Fields inherited from class org.mule.processor.AbstractMessageProcessorOwner
`flowConstruct, muleContext`

Fields inherited from interface org.mule.api.lifecycle.Initialisable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Startable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Stoppable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Disposable
`PHASE_NAME`

Constructor Summary
`FirstSuccessful()`

Method Summary
`void` | `initialise()` Method used to perform any initialisation work.
`boolean` | `isMatch(MuleMessage message)` Determines if the event should be processed
`MuleEvent` | `route(MuleEvent event)` Route the given event to one of our targets
`void` | `setFailureExpression(String failureExpression)` Specifies an expression that when evaluated as determines if the processing of one a route was a failure or not.

Methods inherited from class org.mule.routing.outbound.AbstractOutboundRouter
`addRoute, cloneMessage, createEventToRoute, dispose, getEnableCorrelation, getMuleContext, getOwnedMessageProcessors, getReplyTo, getResultsHandler, getRoute, getRouterStatistics, getRoutes, getTransactionConfig, isDynamicRoutes, process, propagateMagicProperties, removeRoute, sendRequest, sendRequestEvent, setEnableCorrelation, setEnableCorrelationAsString, setMessageProcessors, setMessageProperties, setReplyTo, setResultsHandler, setRouterStatistics, setRoutes, setTransactionConfig, start, stop`

Methods inherited from class org.mule.processor.AbstractMessageProcessorOwner
`setFlowConstruct, setMuleContext`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.mule.api.context.MuleContextAware
`setMuleContext`

Methods inherited from interface org.mule.api.construct.FlowConstructAware
`setFlowConstruct`

Field Detail

### failureExpression

    protected String failureExpression

### failureExpressionFilter

    protected ExpressionFilter failureExpressionFilter

Constructor Detail

### FirstSuccessful

    public FirstSuccessful()

Method Detail

### initialise

    public void initialise()
                    throws InitialisationException

  Description copied from interface: `Initialisable`
  Method used to perform any initialisation work. If a fatal error occurs during initialisation an `InitialisationException` 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.

  Specified by:
    `initialise` in interface `Initialisable`
  Overrides:
    `initialise` in class `AbstractOutboundRouter`
  Throws:
    `InitialisationException` - if a fatal error occurs causing the Mule instance to shutdown
    `RecoverableException` - if an error occurs that can be recovered from

### 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

  Returns:
    true if the event should be processed by this router
  Throws:
    `MuleException` - if the event cannot be evaluated

### setFailureExpression

    public void setFailureExpression(String failureExpression)

  Specifies an expression that when evaluated as determines if the processing of one a route was a failure or not.

  Parameters:
    `failureExpression` -
  See Also:
    `ExpressionFilter`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.