org.springframework.integration.router
Class ExpressionEvaluatingRouter

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.handler.AbstractMessageHandler
          extended by org.springframework.integration.router.AbstractMessageRouter
              extended by org.springframework.integration.router.ExpressionEvaluatingRouter
All Implemented Interfaces:
BeanFactoryAware, BeanNameAware, InitializingBean, Ordered, NamedComponent, Orderable, MessageHandler, TrackableComponent

public class ExpressionEvaluatingRouter
extends AbstractMessageRouter

A Message Router implementation that evaluates the specified SpEL expression. The result of evaluation will typically be a String to be resolved to a channel name or a Collection (or Array) of strings.

Since:
2.0

Field Summary
 
Fields inherited from class org.springframework.integration.router.AbstractMessageRouter
channelIdentifierMap
 
Fields inherited from class org.springframework.integration.handler.AbstractMessageHandler
logger
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
ExpressionEvaluatingRouter(Expression expression)
           
 
Method Summary
protected  java.util.List<java.lang.Object> getChannelIdentifiers(Message<?> message)
          Subclasses must implement this method to return the channel identifiers.
 void onInit()
          Subclasses may implement this for initialization logic.
 
Methods inherited from class org.springframework.integration.router.AbstractMessageRouter
getComponentType, getMessagingTemplate, getRequiredConversionService, handleMessageInternal, removeChannelMapping, setApplySequence, setChannelIdentifierMap, setChannelMapping, setChannelResolver, setDefaultOutputChannel, setIgnoreChannelNameResolutionFailures, setIgnoreSendFailures, setPrefix, setResolutionRequired, setSuffix, setTimeout
 
Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler
getOrder, handleMessage, setOrder, setShouldTrack
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.integration.context.NamedComponent
getComponentName
 

Constructor Detail

ExpressionEvaluatingRouter

public ExpressionEvaluatingRouter(Expression expression)
Method Detail

onInit

public final void onInit()
Description copied from class: IntegrationObjectSupport
Subclasses may implement this for initialization logic.

Overrides:
onInit in class AbstractMessageRouter

getChannelIdentifiers

protected java.util.List<java.lang.Object> getChannelIdentifiers(Message<?> message)
Description copied from class: AbstractMessageRouter
Subclasses must implement this method to return the channel identifiers.

Specified by:
getChannelIdentifiers in class AbstractMessageRouter