Class XPathRouter

All Implemented Interfaces:
org.reactivestreams.Subscriber<Message<?>>, Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, Ordered, ExpressionCapable, Orderable, IntegrationPattern, MessageRouter, NamedComponent, IntegrationManagement, MappingMessageRouterManagement, TrackableComponent, MessageHandler, reactor.core.CoreSubscriber<Message<?>>

public class XPathRouter
extends AbstractMappingMessageRouter
Message Router that uses XPathExpression evaluation to determine channel names.
Author:
Jonas Partner, Oleg Zhurakousky
  • Constructor Details

    • XPathRouter

      public XPathRouter​(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 - the XPath expression as a String
      namespaces - map of namespaces with prefixes as the map keys
    • XPathRouter

      public XPathRouter​(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 - the XPath expression as a String
      prefix - namespace prefix
      namespace - namespace uri
    • XPathRouter

      public XPathRouter​(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​(XPathExpression expression)
      Create a router that uses the provided XPath expression.
      Parameters:
      expression - the XPath expression
  • Method Details