Class ChainingRouter

  extended by org.mule.processor.AbstractMuleObjectOwner<MessageProcessor>
      extended by org.mule.processor.AbstractMessageProcessorOwner
          extended by org.mule.routing.outbound.AbstractOutboundRouter
              extended by org.mule.routing.outbound.FilteringOutboundRouter
                  extended by org.mule.routing.outbound.ChainingRouter
All Implemented Interfaces:
AnnotatedObject, FlowConstructAware, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, MessageProcessor, MessageRouter, Matchable, MatchableMessageProcessor, MatchableMessageRouter, OutboundRouter, RouterStatisticsRecorder, TransformingMatchable

public class ChainingRouter
extends FilteringOutboundRouter

ChainingRouter is used to pass a Mule event through multiple targets using the result of the first as the input for the second.

Field Summary
Fields inherited from class org.mule.routing.outbound.FilteringOutboundRouter
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.AbstractMuleObjectOwner
flowConstruct, muleContext
Fields inherited from interface org.mule.api.lifecycle.Initialisable
Fields inherited from interface org.mule.api.lifecycle.Startable
Fields inherited from interface org.mule.api.lifecycle.Stoppable
Fields inherited from interface org.mule.api.lifecycle.Disposable
Fields inherited from interface org.mule.api.AnnotatedObject
Constructor Summary
Method Summary
 void initialise()
          Method used to perform any initialisation work.
protected  void processIntermediaryResult(MuleMessage localResult, MuleMessage intermediaryResult)
          Process intermediary result of invocation.
 MuleEvent route(MuleEvent event)
Methods inherited from class org.mule.routing.outbound.FilteringOutboundRouter
addRoute, getFilter, getRoute, getTransformers, 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, 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
getAnnotation, getAnnotations, getOwnedObjects, setAnnotations
Methods inherited from class org.mule.processor.AbstractMuleObjectOwner
getFlowConstruct, 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
Methods inherited from interface org.mule.api.construct.FlowConstructAware

Constructor Detail


public ChainingRouter()
Method Detail


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
initialise in class FilteringOutboundRouter
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from


public MuleEvent route(MuleEvent event)
                throws RoutingException
route in class FilteringOutboundRouter


protected void processIntermediaryResult(MuleMessage localResult,
                                         MuleMessage intermediaryResult)
Process intermediary result of invocation. The method will be invoked only if both local and intermediary results are available (not null).

Overriding methods must call super(localResult, intermediaryResult), unless they are modifying the correlation workflow (if you know what that means, you know what you are doing and when to do it).

Default implementation propagates the following properties:

localResult - result of the last endpoint invocation
intermediaryResult - the message travelling across the targets

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