Spring Integration

org.springframework.integration.xml.router
Class AbstractXPathRouter

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
                  extended by org.springframework.integration.xml.router.AbstractXPathRouter
All Implemented Interfaces:
BeanFactoryAware, BeanNameAware, InitializingBean, Ordered, NamedComponent, MessageHandler, TrackableComponent
Direct Known Subclasses:
XPathMultiChannelRouter, XPathSingleChannelRouter

public abstract class AbstractXPathRouter
extends AbstractChannelNameResolvingMessageRouter

Abstract base class for Message Routers that use XPathExpression evaluation to determine channel names.

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
AbstractXPathRouter(String expression)
          Create a router that uses an XPath expression with no namespaces.
AbstractXPathRouter(String expression, Map<String,String> namespaces)
          Create a router that uses an XPath expression.
AbstractXPathRouter(String expression, String prefix, String namespace)
          Create a router uses an XPath expression with one namespace.
AbstractXPathRouter(org.springframework.xml.xpath.XPathExpression expression)
          Create a router that uses the provided XPath expression.
 
Method Summary
protected  XmlPayloadConverter getConverter()
           
protected  org.springframework.xml.xpath.XPathExpression getXPathExpression()
           
 void setConverter(XmlPayloadConverter converter)
          Converter used to convert payloads prior to XPath testing.
 
Methods inherited from class org.springframework.integration.router.AbstractChannelNameResolvingMessageRouter
determineTargetChannels, getChannelIndicatorList, onInit, setChannelResolver, setIgnoreChannelNameResolutionFailures, setPrefix, setSuffix
 
Methods inherited from class org.springframework.integration.router.AbstractMessageRouter
getComponentType, getMessagingTemplate, handleMessageInternal, setApplySequence, setDefaultOutputChannel, setIgnoreSendFailures, setResolutionRequired, 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, getRequiredMetadataPersister, 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

AbstractXPathRouter

public AbstractXPathRouter(String expression,
                           Map<String,String> namespaces)
Create a router that uses an XPath expression. The expression may contain zero or more namespace prefixes.

Parameters:
expression -
namespaces -

AbstractXPathRouter

public AbstractXPathRouter(String expression,
                           String prefix,
                           String namespace)
Create a router uses an XPath expression with one namespace. For example, expression='/ns1:one/@type' prefix='ns1' namespace='www.example.org'

Parameters:
expression -
prefix -
namespace -

AbstractXPathRouter

public AbstractXPathRouter(String expression)
Create a router that uses an XPath expression with no namespaces. For example '/one/@type'

Parameters:
expression -

AbstractXPathRouter

public AbstractXPathRouter(org.springframework.xml.xpath.XPathExpression expression)
Create a router that uses the provided XPath expression.

Parameters:
expression -
Method Detail

getConverter

protected XmlPayloadConverter getConverter()

setConverter

public void setConverter(XmlPayloadConverter converter)
Converter used to convert payloads prior to XPath testing.

Parameters:
converter -

getXPathExpression

protected org.springframework.xml.xpath.XPathExpression getXPathExpression()

Spring Integration

Copyright © 2010. All Rights Reserved.