@ComponentProfile(summary="InputCondition implementation that matches against a specific regular expression", since="3.8.4") public class MatchCondition extends java.lang.Object implements InputCondition
InputCondition
implementation that matches against a regular expression.In the adapter configuration file this class is aliased as stax-plugin-match-rule which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
MatchCondition() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMatches() |
java.lang.String |
getWhen() |
void |
init() |
boolean |
matches(AdaptrisMessage msg)
Whether or not this message should have the plugin applied.
|
void |
setMatches(java.lang.String s)
Set the regular expression to match
getWhen() against. |
void |
setWhen(java.lang.String s)
Specify the value to check against when determining whether to apply the transform plugin.
|
MatchCondition |
withMatches(java.lang.String regexp) |
MatchCondition |
withWhen(java.lang.String v) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, start, stop
public void init() throws CoreException
init
in interface ComponentLifecycle
CoreException
public boolean matches(AdaptrisMessage msg)
InputCondition
matches
in interface InputCondition
msg
- the messagepublic java.lang.String getWhen()
public void setWhen(java.lang.String s)
s
- the value, which supports the %message{}
syntax to resolve metadata.public MatchCondition withWhen(java.lang.String v)
setWhen(String)
public java.lang.String getMatches()
public void setMatches(java.lang.String s)
getWhen()
against.s
- a string that conforms to java.util.Pattern
syntax.public MatchCondition withMatches(java.lang.String regexp)
setMatches(String)