org.apache.james.transport.mailets
Class GenericListservManager

java.lang.Object
  extended by org.apache.mailet.GenericMailet
      extended by org.apache.james.transport.mailets.GenericListservManager
All Implemented Interfaces:
Mailet, MailetConfig
Direct Known Subclasses:
AvalonListservManager

public abstract class GenericListservManager
extends GenericMailet

An abstract implementation of a listserv manager. This mailet reads the address to find the command.


Constructor Summary
GenericListservManager()
           
 
Method Summary
abstract  boolean addAddress(MailAddress address)
          Adds an address to the listserv.
abstract  boolean existsAddress(MailAddress address)
          Indicates whether an address already exists on the listserv.
abstract  boolean removeAddress(MailAddress address)
          Removes an address from the listserv.
 void service(Mail mail)
          Processes the message.
 
Methods inherited from class org.apache.mailet.GenericMailet
destroy, getInitParameter, 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

GenericListservManager

public GenericListservManager()
Method Detail

addAddress

public abstract boolean addAddress(MailAddress address)
Adds an address to the listserv. Returns whether command was successful.


removeAddress

public abstract boolean removeAddress(MailAddress address)
Removes an address from the listserv. Returns whether command was successful.


existsAddress

public abstract boolean existsAddress(MailAddress address)
Indicates whether an address already exists on the listserv. Returns whether the address exists.


service

public final void service(Mail mail)
                   throws javax.mail.MessagingException
Processes the message. Checks which command was sent based on the recipient address, and does the appropriate action.

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:
javax.mail.MessagingException - - if an exception occurs that interferes with the mailet's normal operation


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.