org.mule.routing.outbound
Class EndpointSelector
java.lang.Object
org.mule.processor.AbstractMuleObjectOwner<MessageProcessor>
org.mule.processor.AbstractMessageProcessorOwner
org.mule.routing.outbound.AbstractOutboundRouter
org.mule.routing.outbound.FilteringOutboundRouter
org.mule.routing.outbound.EndpointSelector
- All Implemented Interfaces:
- AnnotatedObject, 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>
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 |
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_SELECTOR_EVALUATOR
public static final String DEFAULT_SELECTOR_EVALUATOR
- See Also:
- Constant Field Values
DEFAULT_SELECTOR_EXPRESSION
public static final 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(String endpointName)
throws MuleException
- Throws:
MuleException
getExpression
public String getExpression()
setExpression
public void setExpression(String expression)
getCustomEvaluator
public String getCustomEvaluator()
setCustomEvaluator
public void setCustomEvaluator(String customEvaluator)
getEvaluator
public String getEvaluator()
setEvaluator
public void setEvaluator(String evaluator)
getDefaultEndpointName
public String getDefaultEndpointName()
setDefaultEndpointName
public void setDefaultEndpointName(String defaultEndpointName)
Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.