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, transactionConfig
muleContext
PHASE_NAME
PHASE_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, setUseTemplates
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 static final String DEFAULT_SELECTOR_EVALUATOR
public static final String DEFAULT_SELECTOR_EXPRESSION
public MuleMessage route(MuleMessage message, MuleSession session, boolean synchronous) throws RoutingException
OutboundRouter
route
in interface OutboundRouter
route
in class FilteringOutboundRouter
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
protected OutboundEndpoint lookupEndpoint(String endpointName) throws MuleException
MuleException
public 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–2013 MuleSource, Inc.. All rights reserved.