public class MessagePropertyFilter extends Object implements Filter
MessagePropertyFilter
can be used to filter against properties on
an event. This can be very useful as the event properties represent all the meta
information about the event from the underlying transport, so for an event
received over HTTP you can check for HTTP headers etc. The pattern should be
expressed as a key/value pair, i.e. "propertyName=value". If you want to compare
more than one property you can use the logic filters for And, Or and Not
expressions. By default the comparison is case sensitive; you can set the
caseSensitive property to override this.
Since 3.0.0 its possible to set the property value as a wildcard expression i.e.
fooHeader = *foo*
Modifier and Type | Field and Description |
---|---|
protected Log |
logger
logger used by this class
|
Constructor and Description |
---|
MessagePropertyFilter() |
MessagePropertyFilter(String expression) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(MuleMessage message)
Check a given message against this filter.
|
protected boolean |
compare(String value1,
String value2) |
boolean |
equals(Object obj) |
String |
getPattern() |
String |
getScope() |
int |
hashCode() |
boolean |
isCaseSensitive() |
void |
setCaseSensitive(boolean caseSensitive) |
void |
setPattern(String expression) |
void |
setScope(String scope) |
protected final transient Log logger
public MessagePropertyFilter()
public MessagePropertyFilter(String expression)
public boolean accept(MuleMessage message)
Filter
public String getPattern()
public void setPattern(String expression)
public boolean isCaseSensitive()
public void setCaseSensitive(boolean caseSensitive)
public String getScope()
public void setScope(String scope)
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.