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, JDBCListserv

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.


Constructor Summary
GenericListserv()
           
 
Method Summary
 MailAddress getListservAddress()
          The email address that this listserv processes on.
abstract  Collection getMembers()
          Returns a Collection of MailAddress objects of members to receive this email
abstract  String getSubjectPrefix()
          An optional subject prefix.
abstract  boolean isAttachmentsAllowed()
          Returns whether this listserv allow attachments
abstract  boolean isMembersOnly()
          Returns whether this list should restrict to senders only
 boolean isPrefixAutoBracketed()
          Should the subject prefix be automatically surrounded by [].
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
 

Constructor Detail

GenericListserv

public GenericListserv()
Method Detail

getMembers

public abstract Collection getMembers()
                               throws MessagingException
Returns a Collection of MailAddress objects of members to receive this email

MessagingException

isMembersOnly

public abstract boolean isMembersOnly()
                               throws MessagingException
Returns whether this list should restrict to senders only

MessagingException

isAttachmentsAllowed

public abstract boolean isAttachmentsAllowed()
                                      throws MessagingException
Returns whether this listserv allow attachments

MessagingException

isReplyToList

public abstract boolean isReplyToList()
                               throws MessagingException
Returns whether listserv should add reply-to header

MessagingException

getListservAddress

public MailAddress getListservAddress()
                               throws 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.

MessagingException

getSubjectPrefix

public abstract String getSubjectPrefix()
                                 throws MessagingException
An optional subject prefix.

MessagingException

isPrefixAutoBracketed

public boolean isPrefixAutoBracketed()
                              throws MessagingException
Should the subject prefix be automatically surrounded by [].

Returns:
whether the subject prefix will be surrounded by []
Throws:
MessagingException - never, for this implementation

service

public final void service(Mail mail)
                   throws MessagingException
Processes the message. Assumes it is the only recipient of this forked message.

Specified by:
service in interface Mailet
Specified by:
service in class GenericMailet
Parameters:
mail - - the Mail object that contains the MimeMessage and routing information
Throws:
MessagingException - - if an exception occurs that interferes with the mailet's normal operation occurred


"Copyright © 1999-2002 Apache Jakarta Project. All Rights Reserved."