public class BooleanTestXPathMessageSelector extends AbstractXPathMessageSelector
MessageSelector
.
Requires an XPathExpression
which can be evaluated using XPathExpression.evaluateAsBoolean(Node)
.
Supports payloads of type Document
or String
.Constructor and Description |
---|
BooleanTestXPathMessageSelector(String expression)
Create a boolean testing XPath
MessageSelector with no namespace
support. |
BooleanTestXPathMessageSelector(String expression,
Map<String,String> namespaces)
Create a boolean testing XPath
MessageSelector
supporting multiple namespaces. |
BooleanTestXPathMessageSelector(String expression,
String prefix,
String namespace)
Create a boolean testing XPath
MessageSelector supporting a single
namespace. |
BooleanTestXPathMessageSelector(XPathExpression expression)
Create a boolean testing XPath
MessageSelector using the provided
XPathExpression . |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Message<?> message)
Return true if the
XPathExpression evaluates to true |
getConverter, getXPathExpresion, setConverter
public BooleanTestXPathMessageSelector(String expression, Map<String,String> namespaces)
MessageSelector
supporting multiple namespaces.expression
- XPath expression as a Stringnamespaces
- Map of namespaces where the keys are namespace prefixespublic BooleanTestXPathMessageSelector(String expression, String prefix, String namespace)
MessageSelector
supporting a single
namespace.expression
- XPath expression as a Stringprefix
- namespace prefixnamespace
- namespace URIpublic BooleanTestXPathMessageSelector(String expression)
MessageSelector
with no namespace
support.expression
- XPath expression as a Stringpublic BooleanTestXPathMessageSelector(XPathExpression expression)
MessageSelector
using the provided
XPathExpression
.expression
- XPath expressionpublic boolean accept(Message<?> message)
XPathExpression
evaluates to true