Draft of a Mailet inteface. The
service
perform all needed work on the Mail object. Whatever remains at the end of the service is considered to need futher processing and will go to the next Mailet if there is one configured or will go to the error processor if not. Setting a Mail state (setState(String)) to Mail.GHOST or cleaning its recipient list has the same meaning that s no more processing is needed. Instead of creating new messages, the mailet can put a message with new recipients at the top of the mail queue, or insert them immediately after it's execution through the API are provided by the MailetContext interface.
This interface defines methods to initialize a mailet, to service messages, and to remove a mailet from the server. These are known as life-cycle methods and are called in the following sequence:
- The mailet is constructed, then initialized with the init method.
- Any messages for the service method are handled.
- The mailet is taken out of service, then destroyed with the destroy method, then garbage collected and finalized.
In addition to the life-cycle methods, this interface provides the getMailletConfig method, which the mailet can use to get any startup information, and the getMailetInfo method, which allows the mailet to return basic information about itself, such as author, version, and copyright.
@version 1.0.0, 24/04/1999
@author Federico Barbieri
@author Stefano Mazzocchi
@author Pierpaolo Fumagalli
@author Serge Knystautas