public class EndpointSelector extends FilteringOutboundRouter
EndpointSelector selects the outgoing endpoint based on a
an expression evaluator ("header:endpoint" by default). It will first try to match the
endpoint by name and then by address.
The endpoints to use can be set on the router itself or be global endpoint definitions.
<outbound>
<endpoint-selector-router evaluator="xpath" expression="/MSG/HEADER/NEXT-ADDRESS">
<endpoint name="dest1" address="jms://queue1" />
<endpoint name="dest2" address="jms://queue2" />
<endpoint name="dest3" address="jms://queue3" />
</endpoint-selector-router>
</outbound>
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_SELECTOR_EVALUATOR |
static String |
DEFAULT_SELECTOR_EXPRESSION |
ENABLE_CORRELATION_ALWAYS, ENABLE_CORRELATION_IF_NOT_SET, ENABLE_CORRELATION_NEVER, enableCorrelation, endpoints, logger, messageInfoMapping, replyTo, transactionConfigmuleContextPHASE_NAMEPHASE_NAME| Constructor and Description |
|---|
EndpointSelector() |
| Modifier and Type | Method and Description |
|---|---|
String |
getCustomEvaluator() |
String |
getEvaluator() |
String |
getExpression() |
String |
getFullExpression() |
protected OutboundEndpoint |
lookupEndpoint(String endpointName) |
MuleMessage |
route(MuleMessage message,
MuleSession session,
boolean synchronous)
This method is responsible for routing the Message via the MuleSession.
|
void |
setCustomEvaluator(String customEvaluator) |
void |
setEvaluator(String evaluator) |
void |
setExpression(String expression) |
addEndpoint, getEndpoint, getFilter, getTransformers, isMatch, isUseTemplates, setFilter, setTransformers, setUseTemplatescreateTransactionTemplate, dispatch, getEnableCorrelation, getEndpoint, getEndpoints, getMessageInfoMapping, getReplyTo, getTransactionConfig, isDynamicEndpoints, removeEndpoint, send, setEnableCorrelation, setEnableCorrelationAsString, setEndpoints, setMessageInfoMapping, setMessageProperties, setReplyTo, setTransactionConfigdispose, getMuleContext, getRouterStatistics, initialise, setMuleContext, setRouterStatisticsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRouterStatistics, setRouterStatisticsinitialisedisposepublic static final String DEFAULT_SELECTOR_EVALUATOR
public static final String DEFAULT_SELECTOR_EXPRESSION
public MuleMessage route(MuleMessage message, MuleSession session, boolean synchronous) throws RoutingException
OutboundRouterroute in interface OutboundRouterroute in class FilteringOutboundRoutermessage - 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 notRoutingExceptionFilteringOutboundRouter,
ExceptionBasedRouter,
MulticastingRouterprotected OutboundEndpoint lookupEndpoint(String endpointName) throws MuleException
MuleExceptionpublic String getFullExpression()
public String getExpression()
public void setExpression(String expression)
public String getCustomEvaluator()
public void setCustomEvaluator(String customEvaluator)
public String getEvaluator()
public void setEvaluator(String evaluator)
Copyright © 2003-2012 MuleSource, Inc.. All Rights Reserved.