org.springframework.integration.xml.router
Class XPathMultiChannelRouter

java.lang.Object
  extended by org.springframework.integration.handler.AbstractMessageHandler
      extended by org.springframework.integration.router.AbstractMessageRouter
          extended by org.springframework.integration.router.AbstractChannelNameResolvingMessageRouter
              extended by org.springframework.integration.xml.router.AbstractXPathRouter
                  extended by org.springframework.integration.xml.router.XPathMultiChannelRouter
All Implemented Interfaces:
org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean, org.springframework.core.Ordered, MessageHandler

public class XPathMultiChannelRouter
extends AbstractXPathRouter

A router that evaluates the XPath expression using XPathExpression.evaluateAsNodeList(Node) which returns zero or more nodes in conjunction with an instance of NodeMapper to produce zero or more channel names. An instance of XmlPayloadConverter is used to extract the payload as a Node.

Author:
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
XPathMultiChannelRouter(java.lang.String expression)
           
XPathMultiChannelRouter(java.lang.String expression, java.util.Map<java.lang.String,java.lang.String> namespaces)
           
XPathMultiChannelRouter(java.lang.String expression, java.lang.String prefix, java.lang.String namespace)
           
XPathMultiChannelRouter(org.springframework.xml.xpath.XPathExpression expression)
           
 
Method Summary
 java.util.List<java.lang.Object> getChannelIndicatorList(Message<?> message)
          Subclasses must implement this method to return the channel indicators.
 void setNodeMapper(org.springframework.xml.xpath.NodeMapper nodeMapper)
           
 
Methods inherited from class org.springframework.integration.xml.router.AbstractXPathRouter
getConverter, getXPathExpression, setConverter
 
Methods inherited from class org.springframework.integration.router.AbstractChannelNameResolvingMessageRouter
addChannelFromString, addToCollection, afterPropertiesSet, determineTargetChannels, resolveChannelForName, setBeanFactory, setChannelResolver, setIgnoreChannelNameResolutionFailures, setPrefix, setSuffix
 
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

XPathMultiChannelRouter

public XPathMultiChannelRouter(java.lang.String expression,
                               java.util.Map<java.lang.String,java.lang.String> namespaces)
See Also:
AbstractXPathRouter#AbstractXPathChannelNameResolver(String, Map)

XPathMultiChannelRouter

public XPathMultiChannelRouter(java.lang.String expression,
                               java.lang.String prefix,
                               java.lang.String namespace)
See Also:
AbstractXPathRouter#AbstractXPathChannelNameResolver(String, String, String)

XPathMultiChannelRouter

public XPathMultiChannelRouter(java.lang.String expression)
See Also:
AbstractXPathRouter#AbstractXPathChannelNameResolver(String)

XPathMultiChannelRouter

public XPathMultiChannelRouter(org.springframework.xml.xpath.XPathExpression expression)
See Also:
AbstractXPathRouter#AbstractXPathChannelNameResolver(XPathExpression)
Method Detail

setNodeMapper

public void setNodeMapper(org.springframework.xml.xpath.NodeMapper nodeMapper)

getChannelIndicatorList

public java.util.List<java.lang.Object> getChannelIndicatorList(Message<?> message)
Description copied from class: AbstractChannelNameResolvingMessageRouter
Subclasses must implement this method to return the channel indicators.

Specified by:
getChannelIndicatorList in class AbstractChannelNameResolvingMessageRouter