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.Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.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) |
String |
getExpression() |
boolean |
isCaseSensitive() |
void |
setCaseSensitive(boolean caseSensitive) |
void |
setExpression(String expression) |
void |
setPattern(String pattern)
All Filters that are configured via spring have to implement this method.
|
protected final transient org.apache.commons.logging.Log logger
public MessagePropertyFilter()
public MessagePropertyFilter(String expression)
public boolean accept(MuleMessage message)
Filter
public String getExpression()
public void setExpression(String expression)
public boolean isCaseSensitive()
public void setCaseSensitive(boolean caseSensitive)
public void setPattern(String pattern)
Copyright © 2003–2013 MuleSource, Inc.. All rights reserved.