public class FilteringOutboundRouter extends AbstractOutboundRouter
FilteringRouter
is a router that accepts events based on a filter
set.ENABLE_CORRELATION_ALWAYS, ENABLE_CORRELATION_IF_NOT_SET, ENABLE_CORRELATION_NEVER, enableCorrelation, endpoints, logger, messageInfoMapping, replyTo, transactionConfig
muleContext
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
FilteringOutboundRouter() |
Modifier and Type | Method and Description |
---|---|
void |
addEndpoint(OutboundEndpoint endpoint)
Adds an endpoint to this router
|
OutboundEndpoint |
getEndpoint(int index,
MuleMessage message)
Will Return the endpont at the given index and will resolve any template tags
on the Endpoint URI if necessary
|
Filter |
getFilter() |
List |
getTransformers() |
boolean |
isMatch(MuleMessage message)
Determines if the event should be processed by this router.
|
boolean |
isUseTemplates() |
MuleMessage |
route(MuleMessage message,
MuleSession session,
boolean synchronous)
This method is responsible for routing the Message via the MuleSession.
|
void |
setFilter(Filter filter) |
void |
setTransformers(List transformers) |
void |
setUseTemplates(boolean useTemplates) |
createTransactionTemplate, dispatch, getEnableCorrelation, getEndpoint, getEndpoints, getMessageInfoMapping, getReplyTo, getTransactionConfig, isDynamicEndpoints, removeEndpoint, send, setEnableCorrelation, setEnableCorrelationAsString, setEndpoints, setMessageInfoMapping, setMessageProperties, setReplyTo, setTransactionConfig
dispose, getMuleContext, getRouterStatistics, initialise, setMuleContext, setRouterStatistics
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRouterStatistics, setRouterStatistics
initialise
dispose
public MuleMessage route(MuleMessage message, MuleSession session, boolean synchronous) throws RoutingException
OutboundRouter
message
- the message to send via one or more endpoints on this routersession
- the session used to actually send the eventsynchronous
- whether the invocation process should be synchronous or notRoutingException
FilteringOutboundRouter
,
ExceptionBasedRouter
,
MulticastingRouter
public Filter getFilter()
public void setFilter(Filter filter)
public boolean isMatch(MuleMessage message) throws RoutingException
OutboundRouter
message
- the current message to evaluateRoutingException
SelectiveConsumer
public List getTransformers()
public void setTransformers(List transformers)
public void addEndpoint(OutboundEndpoint endpoint)
OutboundRouter
addEndpoint
in interface OutboundRouter
addEndpoint
in class AbstractOutboundRouter
endpoint
- the endpoint to add to the routerpublic OutboundEndpoint getEndpoint(int index, MuleMessage message) throws CouldNotRouteOutboundMessageException
index
- the index of the endpoint to getmessage
- the current message. 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)
Copyright © 2003–2013 MuleSource, Inc.. All rights reserved.