org.springframework.integration.router
Class PayloadTypeRouter

java.lang.Object
  extended by org.springframework.integration.handler.AbstractMessageHandler
      extended by org.springframework.integration.router.AbstractMessageRouter
          extended by org.springframework.integration.router.AbstractSingleChannelRouter
              extended by org.springframework.integration.router.PayloadTypeRouter
All Implemented Interfaces:
org.springframework.core.Ordered, MessageHandler

public class PayloadTypeRouter
extends AbstractSingleChannelRouter

A Message Router that resolves the MessageChannel based on the Message's payload type.

Author:
Mark Fisher

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
PayloadTypeRouter()
           
 
Method Summary
protected  MessageChannel determineTargetChannel(Message<?> message)
          Subclasses must implement this method to return the target channel.
 void setPayloadTypeChannelMap(java.util.Map<java.lang.Class<?>,MessageChannel> payloadTypeChannelMap)
           
 
Methods inherited from class org.springframework.integration.router.AbstractSingleChannelRouter
determineTargetChannels
 
Methods inherited from class org.springframework.integration.router.AbstractMessageRouter
handleMessageInternal, setDefaultOutputChannel, setResolutionRequired, setTimeout
 
Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler
getOrder, handleMessage, setOrder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PayloadTypeRouter

public PayloadTypeRouter()
Method Detail

setPayloadTypeChannelMap

public void setPayloadTypeChannelMap(java.util.Map<java.lang.Class<?>,MessageChannel> payloadTypeChannelMap)

determineTargetChannel

protected MessageChannel determineTargetChannel(Message<?> message)
Description copied from class: AbstractSingleChannelRouter
Subclasses must implement this method to return the target channel.

Specified by:
determineTargetChannel in class AbstractSingleChannelRouter