org.apache.james.transport
Interface MailProcessor

All Known Implementing Classes:
LinearProcessor, StateAwareProcessorList

public interface MailProcessor

NOTE: this is an experimental interface. It will be probably dropped later.

Since:
2.3.0a3 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.

Method Summary
 void service(org.apache.mailet.Mail mail)
          Called by the mailet container to allow the mailet to process to a message.
 

Method Detail

service

void service(org.apache.mailet.Mail mail)
             throws javax.mail.MessagingException
Called by the mailet container to allow the mailet to process to a message.

This method is only called after the mailet's init() method has completed successfully.

Mailets typically run inside multithreaded mailet containers that can handle multiple requests concurrently. Developers must be aware to synchronize access to any shared resources such as files, network connections, as well as the mailet's class and instance variables. More information on multithreaded programming in Java is available in the Java tutorial on multi-threaded programming.

Parameters:
mail - - the Mail object that contains the message and routing information
Throws:
javax.mail.MessagingException - - if a message or address parsing exception occurs or an exception that interferes with the mailet's normal operation


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