org.mule.routing.outbound
Class EndpointSelector
java.lang.Object
org.mule.routing.outbound.AbstractOutboundRouter
org.mule.routing.outbound.FilteringOutboundRouter
org.mule.routing.outbound.EndpointSelector
- All Implemented Interfaces:
- FlowConstructAware, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, MessageProcessor, MessageRouter, Matchable, MatchableMessageProcessor, MatchableMessageRouter, OutboundRouter, RouterStatisticsRecorder, TransformingMatchable
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 targets 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>
Fields inherited from class org.mule.routing.outbound.AbstractOutboundRouter |
enableCorrelation, flowConstruct, initialised, logger, magicProperties, muleContext, replyTo, resultsHandler, routes, started, transactionConfig |
Methods inherited from class org.mule.routing.outbound.FilteringOutboundRouter |
addRoute, getFilter, getRoute, getTransformers, initialise, isMatch, isTransformBeforeMatch, isUseTemplates, setFilter, setTransformers, setUseTemplates |
Methods inherited from class org.mule.routing.outbound.AbstractOutboundRouter |
dispose, getEnableCorrelation, getMuleContext, getReplyTo, getResultsHandler, getRoute, getRouterStatistics, getRoutes, getTransactionConfig, isDynamicRoutes, process, propagateMagicProperties, removeRoute, sendRequest, sendRequestEvent, setEnableCorrelation, setEnableCorrelationAsString, setFlowConstruct, setMessageProcessors, setMessageProperties, setMuleContext, 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 |
DEFAULT_SELECTOR_EVALUATOR
public static final java.lang.String DEFAULT_SELECTOR_EVALUATOR
- See Also:
- Constant Field Values
DEFAULT_SELECTOR_EXPRESSION
public static final java.lang.String DEFAULT_SELECTOR_EXPRESSION
- See Also:
- Constant Field Values
EndpointSelector
public EndpointSelector()
route
public MuleEvent route(MuleEvent event)
throws RoutingException
- Overrides:
route
in class FilteringOutboundRouter
- Throws:
RoutingException
lookupEndpoint
protected MessageProcessor lookupEndpoint(java.lang.String endpointName)
throws MuleException
- Throws:
MuleException
getExpression
public java.lang.String getExpression()
setExpression
public void setExpression(java.lang.String expression)
getCustomEvaluator
public java.lang.String getCustomEvaluator()
setCustomEvaluator
public void setCustomEvaluator(java.lang.String customEvaluator)
getEvaluator
public java.lang.String getEvaluator()
setEvaluator
public void setEvaluator(java.lang.String evaluator)
getDefaultEndpointName
public java.lang.String getDefaultEndpointName()
setDefaultEndpointName
public void setDefaultEndpointName(java.lang.String defaultEndpointName)
Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.