org.mule.routing.outbound
Class FilteringOutboundRouter
java.lang.Object
org.mule.routing.outbound.AbstractOutboundRouter
org.mule.routing.outbound.FilteringOutboundRouter
- All Implemented Interfaces:
- FlowConstructAware, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, MessageProcessor, MessageRouter, Matchable, MatchableMessageProcessor, MatchableMessageRouter, OutboundRouter, RouterStatisticsRecorder, TransformingMatchable
- Direct Known Subclasses:
- AbstractMessageSplitter, AbstractRecipientList, ChainingRouter, EndpointSelector, MessageChunkingRouter, MulticastingRouter, OutboundPassThroughRouter, SxcFilteringOutboundRouter
public class FilteringOutboundRouter
- extends AbstractOutboundRouter
- implements TransformingMatchable
FilteringRouter is a router that accepts events based on a filter
set.
| 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 |
dispose, getEnableCorrelation, getMuleContext, getReplyTo, getResultsHandler, getRoute, getRouterStatistics, getRoutes, getTransactionConfig, 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 |
expressionManager
protected ExpressionManager expressionManager
FilteringOutboundRouter
public FilteringOutboundRouter()
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 RoutingException
- Specified by:
route in class AbstractOutboundRouter
- Throws:
RoutingException
getFilter
public Filter getFilter()
setFilter
public void setFilter(Filter filter)
isMatch
public boolean isMatch(MuleMessage message)
throws RoutingException
- 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:
RoutingException
getTransformers
public List<Transformer> getTransformers()
setTransformers
public void setTransformers(List<Transformer> transformers)
addRoute
public void addRoute(MessageProcessor target)
throws MuleException
- Description copied from interface:
MessageRouter
- Adds a new message processor to the list of routes
- Specified by:
addRoute in interface MessageRouter- Overrides:
addRoute in class AbstractOutboundRouter
- Parameters:
target - new destination message processor
- Throws:
MuleException
getRoute
public MessageProcessor getRoute(int index,
MuleMessage message)
throws CouldNotRouteOutboundMessageException
- Will Return the target at the given index and will resolve any template tags
on the Endpoint URI if necessary
- Parameters:
index - the index of the endpoint to getmessage - the current message. This is required if template matching is
being used
- Returns:
- the endpoint at the index, with any template tags resolved
- Throws:
CouldNotRouteOutboundMessageException - if the template causs the
endpoint to become illegal or malformed
isUseTemplates
public boolean isUseTemplates()
setUseTemplates
public void setUseTemplates(boolean useTemplates)
isTransformBeforeMatch
public boolean isTransformBeforeMatch()
- Specified by:
isTransformBeforeMatch in interface TransformingMatchable
Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.