Package mireka.transmission.queue
Interface MailProcessor
-
public interface MailProcessorA MailProcessor object is responsible to process the mail which has come to the head of a queue. It is created by aMailProcessorFactory, which received the mail object for which this instance will be responsible.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidrun()It is called to process the mail for which this instance is responsible.
-
-
-
Method Detail
-
run
void run() throws LocalMailSystemException
It is called to process the mail for which this instance is responsible. If this function returns without throwing an exception, then the queue deletes the mail.Note: this function is allowed to throw an exception only if there is a local error. If, for example, a remote mail system cannot be connected, then it must not throw an exception. Of course, appropriate measures must be taken, for example by moving the mail into a retry queue, but the processing must be considered successful.
- Throws:
LocalMailSystemException- if it cannot process its mail. The future of the mail depends on theLocalMailSystemException.errorStatus()of the thrown exception. If the exception indicates a transient error, then the mail remains in the queue, and a new MailProcessor object will be created and run 5 minutes later. This will be repeated up to 24 hours. If the exception indicates a permanent error then the queue will attempt to move the mail into an error folder, where the mail system administrator can examine it later.
-
-