public class WildcardFilter extends Object implements Filter, ObjectFilter, MuleContextAware
WildcardFilter is used to match Strings against wildcards. It performs matches with "*", i.e. "jms.events.*" would
catch "jms.events.customer" and "jms.events.receipts". This filter accepts a comma-separated list of patterns, so more than one
filter pattern can be matched for a given argument: "jms.events.*, jms.actions.*" will match "jms.events.system" and
"jms.actions" but not "jms.queue".| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger |
protected String |
pattern |
protected String[] |
patterns |
| Constructor and Description |
|---|
WildcardFilter() |
WildcardFilter(String pattern) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(org.mule.runtime.api.message.Message message,
Event.Builder builder)
Checks a given message against this filter.
|
boolean |
accept(Object object) |
boolean |
equals(Object obj) |
String |
getPattern() |
int |
hashCode() |
boolean |
isCaseSensitive() |
void |
setCaseSensitive(boolean caseSensitive) |
void |
setMuleContext(MuleContext context) |
void |
setPattern(String pattern) |
protected final org.slf4j.Logger logger
protected volatile String pattern
protected volatile String[] patterns
public WildcardFilter()
public WildcardFilter(String pattern)
public boolean accept(org.mule.runtime.api.message.Message message,
Event.Builder builder)
FilterTODO MULE-9142 See how this API can be improved to not need the builder.
accept in interface Filtermessage - a non null message to filter.builder - an event builder in case the filter needs to make changes to the event.true if the message matches the filter TODO MULE-9341 Remove Filters that are not needed. This method
will be removed when filters are cleaned up.public boolean accept(Object object)
accept in interface ObjectFilterpublic String getPattern()
public void setPattern(String pattern)
public boolean isCaseSensitive()
public void setCaseSensitive(boolean caseSensitive)
public void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwarecontext - the Mule node.Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.