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 |
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 Collection match(Mail mail)
throws MessagingException
- Matches each recipient one by one through matchRecipient(MailAddress
recipient) method. Handles splitting the recipients Collection
as appropriate.
- Specified by:
match
in interface Matcher
- Specified by:
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
- Throws:
MessagingException
- - if an exception occurs that interferes with the mailet's normal operation
occurred
matchRecipient
public abstract boolean matchRecipient(MailAddress recipient)
throws 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
MessagingException
"Copyright © 1999-2002 Apache Jakarta Project. All Rights Reserved."