org.mule.routing
Class AbstractSelectiveRouter

java.lang.Object
  extended by org.mule.routing.AbstractSelectiveRouter
All Implemented Interfaces:
MessageProcessor, RouterStatisticsRecorder, SelectiveRouter
Direct Known Subclasses:
ChoiceRouter

public abstract class AbstractSelectiveRouter
extends Object
implements SelectiveRouter, RouterStatisticsRecorder


Constructor Summary
AbstractSelectiveRouter()
           
 
Method Summary
 void addRoute(MessageProcessor processor, Filter filter)
           
protected  List<MessageProcessorFilterPair> getConditionalMessageProcessors()
           
 RouterStatistics getRouterStatistics()
           
 MuleEvent process(MuleEvent event)
          Invokes the MessageProcessor.
 void removeRoute(MessageProcessor processor)
           
protected abstract  Collection<MessageProcessor> selectProcessors(MuleEvent event)
           
 void setDefaultRoute(MessageProcessor processor)
           
 void setRouterStatistics(RouterStatistics routerStatistics)
           
 String toString()
           
 void updateRoute(MessageProcessor processor, Filter filter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractSelectiveRouter

public AbstractSelectiveRouter()
Method Detail

addRoute

public void addRoute(MessageProcessor processor,
                     Filter filter)
Specified by:
addRoute in interface SelectiveRouter

removeRoute

public void removeRoute(MessageProcessor processor)
Specified by:
removeRoute in interface SelectiveRouter

updateRoute

public void updateRoute(MessageProcessor processor,
                        Filter filter)
Specified by:
updateRoute in interface SelectiveRouter

setDefaultRoute

public void setDefaultRoute(MessageProcessor processor)
Specified by:
setDefaultRoute in interface SelectiveRouter

process

public MuleEvent process(MuleEvent event)
                  throws MuleException
Description copied from interface: MessageProcessor
Invokes the MessageProcessor.

Specified by:
process in interface MessageProcessor
Parameters:
event - MuleEvent to be processed
Returns:
optional response MuleEvent
Throws:
MuleException

selectProcessors

protected abstract Collection<MessageProcessor> selectProcessors(MuleEvent event)
Returns:
the processors selected according to the specific router strategy or an empty collection (not null).

getConditionalMessageProcessors

protected List<MessageProcessorFilterPair> getConditionalMessageProcessors()

getRouterStatistics

public RouterStatistics getRouterStatistics()

setRouterStatistics

public void setRouterStatistics(RouterStatistics routerStatistics)
Specified by:
setRouterStatistics in interface RouterStatisticsRecorder

toString

public String toString()
Overrides:
toString in class Object


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