org.apache.james.transport.mailets.listservcommands
Interface IListServCommand

All Known Implementing Classes:
BaseCommand

public interface IListServCommand

IListServCommand is the interface that all pluggable list serv commands must implement. The lifecycle of a IListServCommand will be controlled by the ICommandListservManager

Requests sent to the CommandListservManager take the form of:

 <listName>-<commandName>@domain
 
and if the commandName matches the command's name, then the onCommand(org.apache.mailet.Mail) will be invoked.

A typical command is configured:
 <command name="subscribe" class="Subscribe"/>
 


Typically, IListServCommands will format some text to reply with based off of resource files and calls to XMLResources.getString(java.lang.String) This allows you to customize the messages sent by these commands by editing text files and not editing the javacode.

Since:
2.2.0
Version:
CVS $Revision: 365582 $ $Date: 2006-01-03 03:51:21 -0500 (Tue, 03 Jan 2006) $
See Also:
ICommandListservManager

Method Summary
 String getCommandName()
          The name of this command specified by the 'name' parameter.
 void init(ICommandListservManager commandListservManager, org.apache.avalon.framework.configuration.Configuration configuration)
          Perform any required initialization
 void onCommand(Mail mail)
          Process this command to your hearts content
 

Method Detail

getCommandName

public String getCommandName()
The name of this command specified by the 'name' parameter. eg:
 <command name="subscribe" class="Subscribe"/>
 

Returns:
the name of this command

init

public void init(ICommandListservManager commandListservManager,
                 org.apache.avalon.framework.configuration.Configuration configuration)
          throws org.apache.avalon.framework.configuration.ConfigurationException
Perform any required initialization

Parameters:
configuration -
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

onCommand

public void onCommand(Mail mail)
               throws MessagingException
Process this command to your hearts content

Parameters:
mail -
Throws:
MessagingException


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