Methods Summary |
---|
public void | destroy()Called by the mailet container to indicate to a matcher that the
matcher is being taken out of service.
//Do nothing
|
public java.lang.String | getCondition()Returns a String containing the value of the named initialization
parameter, or null if the parameter does not exist.
This method is supplied for convenience. It gets the value of the
named parameter from the matcher's MatcherConfig object.
return config.getCondition();
|
public MailetContext | getMailetContext()Returns a reference to the MailetContext in which this matcher is
running.
return getMatcherConfig().getMailetContext();
|
public MatcherConfig | getMatcherConfig()Returns this matcher's MatcherConfig object.
return config;
|
public java.lang.String | getMatcherInfo()Returns information about the matcher, such as author, version, and
copyright. By default, this method returns an empty string. Override
this method to have it return a meaningful value.
return "";
|
public java.lang.String | getMatcherName()Returns the name of this matcher instance.
return config.getMatcherName();
|
public void | init(MatcherConfig newConfig)Called by the matcher container to indicate to a matcher that the
matcher is being placed into service.
This implementation stores the MatcherConfig object it receives from
the matcher container for alter use. When overriding this form of the
method, call super.init(config).
config = newConfig;
init();
|
public void | init()A convenience method which can be overridden so that there's no
need to call super.init(config).
Instead of overriding init(MatcherConfig), simply override this
method and it will be called by GenericMatcher.init(MatcherConfig config).
The MatcherConfig object can still be retrieved via getMatcherConfig().
//Do nothing... can be overridden
|
public void | log(java.lang.String message, java.lang.Throwable t)Writes an explanatory message and a stack trace for a given Throwable
exception to the matcher log file, prepended by the matcher's name.
StringBuffer logBuffer =
new StringBuffer(256)
.append(getMatcherName())
.append(": ")
.append(message);
getMailetContext().log(logBuffer.toString(), t);
|
public void | log(java.lang.String message)Writes the specified message to a matcher log file, prepended by
the matcher's name.
StringBuffer logBuffer =
new StringBuffer(256)
.append(getMatcherName())
.append(": ")
.append(message);
getMailetContext().log(logBuffer.toString());
|
public abstract java.util.Collection | match(Mail mail)Called by the matcher container to allow the matcher to process a
message.
This method is declared abstract so subclasses must override it.
|