|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mailet.base.GenericMailet
org.apache.james.transport.mailets.Retry
public class Retry
This Mailet retries delivery of a mail based on schedule specified in the James configuration file by the 'delayTime' attribute. The format of the 'delayTime' attribute is: [attempts*]delay[units]
For example, if the delay times were specified as follows:
Following list summarizes all the attributes of this Mailet that can be configured:
Field Summary | |
---|---|
static java.lang.String |
ORIGINAL_ERROR
|
Constructor Summary | |
---|---|
Retry()
|
Method Summary | |
---|---|
void |
destroy()
Stops all the worker threads that are waiting for messages. |
java.lang.String |
getMailetInfo()
|
void |
init()
Initializes all arguments based on configuration values specified in the James configuration file. |
protected void |
preprocess(org.apache.mailet.Mail mail)
Pre-processes the Mail object before resending. |
void |
run()
Handles checking the retrying spool for new mail and retrying them if there are ready for retrying. |
void |
service(org.apache.mailet.Mail mail)
Checks if maximum retry count has been reached. |
Methods inherited from class org.apache.mailet.base.GenericMailet |
---|
arrayToString, checkInitParameters, getInitParameter, getInitParameter, getInitParameter, getInitParameterNames, getMailetConfig, getMailetContext, getMailetName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ORIGINAL_ERROR
Constructor Detail |
---|
public Retry()
Method Detail |
---|
public void init() throws javax.mail.MessagingException
init
in class org.apache.mailet.base.GenericMailet
javax.mail.MessagingException
- on failure to initialize attributes.public java.lang.String getMailetInfo()
getMailetInfo
in interface org.apache.mailet.Mailet
getMailetInfo
in class org.apache.mailet.base.GenericMailet
public void service(org.apache.mailet.Mail mail) throws javax.mail.MessagingException
service
in interface org.apache.mailet.Mailet
service
in class org.apache.mailet.base.GenericMailet
mail
- the mail to be retried.
javax.mail.MessagingException
- on failure to send it to the error processor.Mailet.service(org.apache.mailet.Mail)
public void destroy()
destroy
in interface org.apache.mailet.Mailet
destroy
in class org.apache.mailet.base.GenericMailet
public void run()
run
in interface java.lang.Runnable
protected void preprocess(org.apache.mailet.Mail mail)
Mail
object before resending.
This method can be used by subclasses to perform application specific processing on the Mail object, such as, adding and/or removing application specific Mail attributes etc. The default implementation leaves the Mail object intact.
mail
- mail object that can be customized before resending.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |