public class RegexTestXPathMessageSelector extends AbstractXPathMessageSelector
MessageSelector
that tests if a provided String value
matches a given Regular Expression.Constructor and Description |
---|
RegexTestXPathMessageSelector(String expression,
Map<String,String> namespaces,
String regex)
Creates a selector which attempts to match the given regex and supports multiple namespaces.
|
RegexTestXPathMessageSelector(String expression,
String regex)
Creates a non-namespaced selector which attempts to match the given regex.
|
RegexTestXPathMessageSelector(String expression,
String prefix,
String namespace,
String regex)
Creates a selector which attempts to match the given regex and supports a single namespace.
|
RegexTestXPathMessageSelector(XPathExpression expression,
String regex)
Creates a selector which attempts to match the given regex against the evaluation result
of the provided
XPathExpression . |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Message<?> message)
Evaluate the payload and return true if the value returned by the
XPathExpression matches the regex . |
getConverter, getXPathExpresion, setConverter
public RegexTestXPathMessageSelector(String expression, Map<String,String> namespaces, String regex)
expression
- XPath expression as a Stringnamespaces
- Map of namespaces where the keys are namespace prefixesregex
- regular expression to matchpublic RegexTestXPathMessageSelector(String expression, String prefix, String namespace, String regex)
expression
- XPath expression as a Stringprefix
- namespace prefixnamespace
- namespace URIregex
- regular expression to matchpublic RegexTestXPathMessageSelector(String expression, String regex)
expression
- XPath expression as a Stringregex
- regular expression to matchpublic RegexTestXPathMessageSelector(XPathExpression expression, String regex)
XPathExpression
.expression
- XPath expressionregex
- regular expression to matchpublic boolean accept(Message<?> message)
XPathExpression
matches the regex
.