Spring Integration

org.springframework.integration.router
Class AbstractChannelNameResolvingMessageRouter

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.AbstractChannelNameResolvingMessageRouter
All Implemented Interfaces:
BeanFactoryAware, BeanNameAware, InitializingBean, Ordered, MessageHandler, NamedComponent
Direct Known Subclasses:
AbstractSingleChannelNameRouter, AbstractXPathRouter, ExpressionEvaluatingRouter, HeaderValueRouter, MethodInvokingRouter

public abstract class AbstractChannelNameResolvingMessageRouter
extends AbstractMessageRouter

A base class for router implementations that return only the channel name(s) rather than MessageChannel instances.

Author:
Mark Fisher, Jonas Partner

Field Summary
 
Fields inherited from class org.springframework.integration.handler.AbstractMessageHandler
logger
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
AbstractChannelNameResolvingMessageRouter()
           
 
Method Summary
protected  Collection<MessageChannel> determineTargetChannels(Message<?> message)
          Subclasses must implement this method to return the target channels for a given Message.
protected abstract  List<Object> getChannelIndicatorList(Message<?> message)
          Subclasses must implement this method to return the channel indicators.
 void onInit()
          Subclasses may implement this for initialization logic.
 void setChannelResolver(ChannelResolver channelResolver)
          Specify the ChannelResolver strategy to use.
 void setIgnoreChannelNameResolutionFailures(boolean ignoreChannelNameResolutionFailures)
          Specify whether this router should ignore any failure to resolve a channel name to an actual MessageChannel instance when delegating to the ChannelResolver strategy.
 void setPrefix(String prefix)
          Specify a prefix to be added to each channel name prior to resolution.
 void setSuffix(String suffix)
          Specify a suffix to be added to each channel name prior to resolution.
 
Methods inherited from class org.springframework.integration.router.AbstractMessageRouter
getComponentType, handleMessageInternal, setApplySequence, setDefaultOutputChannel, setIgnoreSendFailures, setResolutionRequired, setTimeout
 
Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler
getOrder, handleMessage, resolveReplyChannel, setOrder
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString, writeMessageHistory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractChannelNameResolvingMessageRouter

public AbstractChannelNameResolvingMessageRouter()
Method Detail

setChannelResolver

public void setChannelResolver(ChannelResolver channelResolver)
Specify the ChannelResolver strategy to use. The default is a BeanFactoryChannelResolver.

Overrides:
setChannelResolver in class IntegrationObjectSupport

setPrefix

public void setPrefix(String prefix)
Specify a prefix to be added to each channel name prior to resolution.


setSuffix

public void setSuffix(String suffix)
Specify a suffix to be added to each channel name prior to resolution.


setIgnoreChannelNameResolutionFailures

public void setIgnoreChannelNameResolutionFailures(boolean ignoreChannelNameResolutionFailures)
Specify whether this router should ignore any failure to resolve a channel name to an actual MessageChannel instance when delegating to the ChannelResolver strategy.


onInit

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

Overrides:
onInit in class IntegrationObjectSupport

determineTargetChannels

protected Collection<MessageChannel> determineTargetChannels(Message<?> message)
Description copied from class: AbstractMessageRouter
Subclasses must implement this method to return the target channels for a given Message.

Specified by:
determineTargetChannels in class AbstractMessageRouter

getChannelIndicatorList

protected abstract List<Object> getChannelIndicatorList(Message<?> message)
Subclasses must implement this method to return the channel indicators.


Spring Integration

Copyright © 2010. All Rights Reserved.