org.apache.mailet
Class GenericRecipientMatcher
java.lang.Object
|
+--org.apache.mailet.GenericMatcher
|
+--org.apache.mailet.GenericRecipientMatcher
- All Implemented Interfaces:
- Matcher, MatcherConfig
- Direct Known Subclasses:
- CommandForListserv, HostIs, HostIsLocal, RecipientIs, RecipientIsLocal, UserIs
- public abstract class GenericRecipientMatcher
- extends GenericMatcher
GenericMatcher makes writing recipient based matchers easier. It provides
simple versions of the lifecycle methods init and destroy and of the methods
in the MatcherConfig interface. GenericMatcher also implements the log method,
declared in the
MatcherContext interface.
- Version:
- 1.0.0, 24/04/1999
- Author:
- Federico Barbieri , Serge Knystautas
Method Summary |
java.util.Collection |
match(Mail mail)
Matches each recipient one by one through matchRecipient(MailAddress
recipient) method. |
abstract boolean |
matchRecipient(MailAddress recipient)
Simple check to match exclusively on the email address (not
message information). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericRecipientMatcher
public GenericRecipientMatcher()
match
public final java.util.Collection match(Mail mail)
throws javax.mail.MessagingException
- Matches each recipient one by one through matchRecipient(MailAddress
recipient) method. Handles splitting the recipients Collection
as appropriate.
- Overrides:
match
in class GenericMatcher
- Parameters:
mail
- - the message and routing information to determine whether to match- Returns:
- Collection the Collection of MailAddress objects that have been matched
matchRecipient
public abstract boolean matchRecipient(MailAddress recipient)
throws javax.mail.MessagingException
- Simple check to match exclusively on the email address (not
message information).
- Parameters:
recipient
- - the address to determine whether to match- Returns:
- boolean whether the recipient is a match
"Copyright © 2001 Apache Jakarta Project. All Rights Reserved."