public class XPathFilter extends AbstractJaxpFilter implements Filter, Initialisable, MuleContextAware
Modifier and Type | Field and Description |
---|---|
protected Logger |
logger |
PHASE_NAME
Constructor and Description |
---|
XPathFilter() |
XPathFilter(String pattern) |
XPathFilter(String pattern,
String expectedValue) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(MuleMessage message)
Check a given message against this filter.
|
protected boolean |
accept(Node node) |
boolean |
equals(Object obj) |
String |
getExpectedValue() |
Map<String,String> |
getNamespaces()
The prefix-to-namespace map for the namespace context to be applied to the
XPath evaluation.
|
String |
getPattern() |
int |
hashCode() |
void |
initialise()
Method used to perform any initialisation work.
|
void |
setExpectedValue(String expectedValue)
Sets the expected result value of the XPath expression
|
void |
setMuleContext(MuleContext context) |
void |
setNamespaces(Map<String,String> prefixToNamespaceMap)
The prefix-to-namespace map for the namespace context to be applied to the
XPath evaluation.
|
void |
setPattern(String pattern) |
void |
setXpathEvaluator(XPathEvaluator xpathEvaluator) |
getDocumentBuilderFactory, setDocumentBuilderFactory, toDOMNode, toDOMNode
protected transient Logger logger
public XPathFilter()
public XPathFilter(String pattern)
public void setMuleContext(MuleContext context)
setMuleContext
in interface MuleContextAware
public void initialise() throws InitialisationException
Initialisable
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.initialise
in interface Initialisable
initialise
in class AbstractJaxpFilter
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownRecoverableException
- if an error occurs that can be recovered frompublic boolean accept(MuleMessage message)
Filter
protected boolean accept(Node node)
public String getPattern()
public void setPattern(String pattern)
pattern
- The XPath expressionpublic String getExpectedValue()
public void setExpectedValue(String expectedValue)
expectedValue
- The expected value.public void setXpathEvaluator(XPathEvaluator xpathEvaluator)
public Map<String,String> getNamespaces()
public void setNamespaces(Map<String,String> prefixToNamespaceMap)
prefixToNamespaceMap
- The prefix-to-namespace map for the namespace
context to be applied to the XPath evaluation.Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.