public class RegExFilter extends Object implements Filter, ObjectFilter, MuleContextAware, org.mule.runtime.api.lifecycle.Initialisable
RegExFilter is used to match a String argument against a regular expression.| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
RegExFilter() |
RegExFilter(String pattern) |
RegExFilter(String pattern,
int flags) |
RegExFilter(String pattern,
String value) |
RegExFilter(String pattern,
String value,
int flags) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Event event,
Event.Builder builder)
Checks a given event against this filter.
|
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) |
int |
getFlags() |
String |
getPattern() |
int |
hashCode() |
void |
initialise() |
void |
setFlags(int flags) |
void |
setMuleContext(MuleContext context) |
void |
setPattern(String pattern) |
void |
setValue(String value) |
public RegExFilter()
public RegExFilter(String pattern)
public RegExFilter(String pattern, int flags)
public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic 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(Event event, Event.Builder builder)
FilterTODO MULE-9142 See how this API can be improved to not need the builder.
public boolean accept(Object object)
accept in interface ObjectFilterpublic String getPattern()
public void setPattern(String pattern)
public int getFlags()
public void setFlags(int flags)
public void setValue(String value)
public void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwarecontext - the Mule node.Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.