public class FilteringOutboundRouter extends AbstractOutboundRouter implements TransformingMatchable
FilteringRouter
is a router that accepts events based on a filter
set.Modifier and Type | Field and Description |
---|---|
protected ExpressionManager |
expressionManager |
enableCorrelation, initialised, logger, replyTo, resultsHandler, routes, started, transactionConfig
flowConstruct, messagingExceptionHandler, muleContext
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
PROPERTY_NAME
Constructor and Description |
---|
FilteringOutboundRouter() |
Modifier and Type | Method and Description |
---|---|
void |
addRoute(MessageProcessor target)
Adds a new message processor to the list of routes
|
Filter |
getFilter() |
MessageProcessor |
getRoute(int index,
MuleEvent event)
Will Return the target at the given index and will resolve any template tags
on the Endpoint URI if necessary
|
List<Transformer> |
getTransformers() |
void |
initialise()
Method used to perform any initialisation work.
|
boolean |
isMatch(MuleMessage message)
Determines if the event should be processed
|
boolean |
isTransformBeforeMatch() |
boolean |
isUseTemplates() |
MuleEvent |
route(MuleEvent event) |
void |
setFilter(Filter filter) |
void |
setTransformers(List<Transformer> transformers) |
void |
setUseTemplates(boolean useTemplates) |
cloneMessage, 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
addMessageProcessorPathElements, getAnnotation, getAnnotations, getOwnedObjects, setAnnotations
getFlowConstruct, getMessagingExceptionHandler, setFlowConstruct, setMessagingExceptionHandler, setMuleContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setMuleContext
setFlowConstruct
protected ExpressionManager expressionManager
public void initialise() throws InitialisationException
Initialisable
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.initialise
in interface Initialisable
initialise
in class AbstractOutboundRouter
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownRecoverableException
- if an error occurs that can be recovered frompublic MuleEvent route(MuleEvent event) throws RoutingException
route
in class AbstractOutboundRouter
RoutingException
public Filter getFilter()
public void setFilter(Filter filter)
public boolean isMatch(MuleMessage message) throws MuleException
Matchable
isMatch
in interface Matchable
message
- the current message to evaluateMuleException
- if the event cannot be evaluatedpublic List<Transformer> getTransformers()
public void setTransformers(List<Transformer> transformers)
public void addRoute(MessageProcessor target) throws MuleException
MessageRouter
addRoute
in interface MessageRouter
addRoute
in class AbstractOutboundRouter
target
- new destination message processorMuleException
public MessageProcessor getRoute(int index, MuleEvent event) throws CouldNotRouteOutboundMessageException
index
- the index of the endpoint to getevent
- the current event. This is required if template matching is
being usedCouldNotRouteOutboundMessageException
- if the template causs the
endpoint to become illegal or malformedpublic boolean isUseTemplates()
public void setUseTemplates(boolean useTemplates)
public boolean isTransformBeforeMatch()
isTransformBeforeMatch
in interface TransformingMatchable
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.