org.mule.routing.outbound
Class FilteringOutboundRouter
java.lang.Object
org.mule.processor.AbstractMuleObjectOwner<MessageProcessor>
org.mule.processor.AbstractMessageProcessorOwner
org.mule.routing.outbound.AbstractOutboundRouter
org.mule.routing.outbound.FilteringOutboundRouter
- All Implemented Interfaces:
- AnnotatedObject, FlowConstructAware, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, MessageProcessor, MessageRouter, Matchable, MatchableMessageProcessor, MatchableMessageRouter, OutboundRouter, RouterStatisticsRecorder, TransformingMatchable
- Direct Known Subclasses:
- AbstractMessageSplitter, AbstractRecipientList, AbstractSequenceRouter, ChainingRouter, EndpointSelector, MessageChunkingRouter, OutboundPassThroughRouter, SxcFilteringOutboundRouter
public class FilteringOutboundRouter
- extends AbstractOutboundRouter
- implements TransformingMatchable
FilteringRouter
is a router that accepts events based on a filter
set.
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 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 MuleException
- Description copied from interface:
Matchable
- Determines if the event should be processed
- Specified by:
isMatch
in interface Matchable
- Parameters:
message
- the current message to evaluate
- Returns:
- true if the event should be processed by this router
- Throws:
MuleException
- if the event cannot be evaluated
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,
MuleEvent event)
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 getevent
- the current event. 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-2012 MuleSoft, Inc.. All Rights Reserved.