org.apache.james.transport.mailets
Class GenericListserv
java.lang.Object
|
+--org.apache.mailet.GenericMailet
|
+--org.apache.james.transport.mailets.GenericListserv
- All Implemented Interfaces:
- Mailet, MailetConfig
- Direct Known Subclasses:
- AvalonListserv
- public abstract class GenericListserv
- extends GenericMailet
An abstract implementation of a listserv. The underlying implementation must define
various settings, and can vary in their individual configuration. Supports restricting
to members only, allowing attachments or not, sending replies back to the list, and an
optional subject prefix.
Method Summary |
MailAddress |
getListservAddress()
The email address that this listserv processes on. |
abstract java.util.Collection |
getMembers()
Returns a Collection of MailAddress objects of members to receive this email |
abstract java.lang.String |
getSubjectPrefix()
An optional subject prefix which will be surrounded by []. |
abstract boolean |
isAttachmentsAllowed()
Returns whether this listserv allow attachments |
abstract boolean |
isMembersOnly()
Returns whether this list should restrict to senders only |
abstract boolean |
isReplyToList()
Returns whether listserv should add reply-to header |
void |
service(Mail mail)
Processes the message. |
Methods inherited from class org.apache.mailet.GenericMailet |
destroy, getInitParameter, getInitParameterNames, getMailetConfig, getMailetContext, getMailetInfo, getMailetName, init, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericListserv
public GenericListserv()
getMembers
public abstract java.util.Collection getMembers()
throws javax.mail.MessagingException
- Returns a Collection of MailAddress objects of members to receive this email
isMembersOnly
public abstract boolean isMembersOnly()
throws javax.mail.MessagingException
- Returns whether this list should restrict to senders only
isAttachmentsAllowed
public abstract boolean isAttachmentsAllowed()
throws javax.mail.MessagingException
- Returns whether this listserv allow attachments
isReplyToList
public abstract boolean isReplyToList()
throws javax.mail.MessagingException
- Returns whether listserv should add reply-to header
getListservAddress
public MailAddress getListservAddress()
throws javax.mail.MessagingException
- The email address that this listserv processes on. If returns null, will use the
recipient of the message, which hopefully will be the correct email address assuming
the matcher was properly specified.
getSubjectPrefix
public abstract java.lang.String getSubjectPrefix()
throws javax.mail.MessagingException
- An optional subject prefix which will be surrounded by [].
service
public final void service(Mail mail)
throws javax.mail.MessagingException
- Processes the message. Assumes it is the only recipient of this forked message.
- Overrides:
service
in class GenericMailet
- Following copied from class:
org.apache.mailet.GenericMailet
- Parameters:
mail
- - the Mail object that contains the MimeMessage and
routing information- Throws:
javax.mail.MessagingException
- - if an exception occurs that interferes with the mailet's normal operation
occurred
Copyright © 2001 Apache Jakarta Project. All Rights Reserved.