org.springframework.integration.xml.router
Class XPathRouter
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.router.AbstractMessageRouter
org.springframework.integration.router.AbstractMappingMessageRouter
org.springframework.integration.xml.router.XPathRouter
- All Implemented Interfaces:
- org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.core.Ordered, org.springframework.integration.context.NamedComponent, org.springframework.integration.context.Orderable, org.springframework.integration.core.MessageHandler, org.springframework.integration.history.TrackableComponent, org.springframework.integration.router.MappingMessageRouterManagement
public class XPathRouter
- extends org.springframework.integration.router.AbstractMappingMessageRouter
Message Router that uses XPathExpression evaluation to determine channel names.
| Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport |
logger |
| Fields inherited from interface org.springframework.core.Ordered |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
|
Constructor Summary |
XPathRouter(java.lang.String expression)
Create a router that uses an XPath expression with no namespaces. |
XPathRouter(java.lang.String expression,
java.util.Map<java.lang.String,java.lang.String> namespaces)
Create a router that uses an XPath expression. |
XPathRouter(java.lang.String expression,
java.lang.String prefix,
java.lang.String namespace)
Create a router uses an XPath expression with one namespace. |
XPathRouter(org.springframework.xml.xpath.XPathExpression expression)
Create a router that uses the provided XPath expression. |
| Methods inherited from class org.springframework.integration.router.AbstractMappingMessageRouter |
determineTargetChannels, getChannelMappings, onInit, removeChannelMapping, setChannelMapping, setChannelMappings, setChannelResolver, setPrefix, setResolutionRequired, setSuffix |
| Methods inherited from class org.springframework.integration.router.AbstractMessageRouter |
getMessagingTemplate, getRequiredConversionService, handleMessageInternal, setApplySequence, setDefaultOutputChannel, setIgnoreSendFailures, 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 |
XPathRouter
public XPathRouter(java.lang.String expression,
java.util.Map<java.lang.String,java.lang.String> namespaces)
- Create a router that uses an XPath expression. The expression may
contain zero or more namespace prefixes.
- Parameters:
expression - the XPath expression as a Stringnamespaces - map of namespaces with prefixes as the map keys
XPathRouter
public XPathRouter(java.lang.String expression,
java.lang.String prefix,
java.lang.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 - the XPath expression as a Stringprefix - namespace prefixnamespace - namespace uri
XPathRouter
public XPathRouter(java.lang.String expression)
- Create a router that uses an XPath expression with no namespaces.
For example '/one/@type'
- Parameters:
expression - the XPath expression as a String
XPathRouter
public XPathRouter(org.springframework.xml.xpath.XPathExpression expression)
- Create a router that uses the provided XPath expression.
- Parameters:
expression - the XPath expression
setEvaluateAsString
public void setEvaluateAsString(boolean evaluateAsString)
setConverter
public void setConverter(XmlPayloadConverter converter)
- Specify the Converter to use when converting payloads prior to XPath evaluation.
getComponentType
public java.lang.String getComponentType()
- Specified by:
getComponentType in interface org.springframework.integration.context.NamedComponent- Overrides:
getComponentType in class org.springframework.integration.router.AbstractMessageRouter
getChannelKeys
protected java.util.List<java.lang.Object> getChannelKeys(org.springframework.integration.Message<?> message)
- Specified by:
getChannelKeys in class org.springframework.integration.router.AbstractMappingMessageRouter