public class RegexTestXPathMessageSelector extends AbstractXPathMessageSelector
MessageSelector
that tests if a provided String value
matches a given Regular Expression.Constructor and Description |
---|
RegexTestXPathMessageSelector(java.lang.String expression,
java.util.Map<java.lang.String,java.lang.String> namespaces,
java.lang.String regex)
Creates a selector which attempts to match the given regex and supports multiple namespaces.
|
RegexTestXPathMessageSelector(java.lang.String expression,
java.lang.String regex)
Creates a non-namespaced selector which attempts to match the given regex.
|
RegexTestXPathMessageSelector(java.lang.String expression,
java.lang.String prefix,
java.lang.String namespace,
java.lang.String regex)
Creates a selector which attempts to match the given regex and supports a single namespace.
|
RegexTestXPathMessageSelector(org.springframework.xml.xpath.XPathExpression expression,
java.lang.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(java.lang.String expression, java.util.Map<java.lang.String,java.lang.String> namespaces, java.lang.String regex)
expression
- XPath expression as a Stringnamespaces
- Map of namespaces where the keys are namespace prefixesregex
- regular expression to matchpublic RegexTestXPathMessageSelector(java.lang.String expression, java.lang.String prefix, java.lang.String namespace, java.lang.String regex)
expression
- XPath expression as a Stringprefix
- namespace prefixnamespace
- namespace URIregex
- regular expression to matchpublic RegexTestXPathMessageSelector(java.lang.String expression, java.lang.String regex)
expression
- XPath expression as a Stringregex
- regular expression to matchpublic RegexTestXPathMessageSelector(org.springframework.xml.xpath.XPathExpression expression, java.lang.String regex)
XPathExpression
.expression
- XPath expressionregex
- regular expression to matchpublic boolean accept(Message<?> message)
XPathExpression
matches the regex
.