public class RetryPolicy
extends Object
Constructor and Description |
---|
RetryPolicy()
Constructs a new empty instance, required attributes must be passed using
the setter methods later.
|
RetryPolicy(DsnMailCreator dsnMailCreator,
Transmitter dsnTransmitter,
Transmitter retryTransmitter)
Constructs a new instance with all required dependencies.
|
Modifier and Type | Method and Description |
---|---|
void |
actOnEntireMailFailure(Mail mail,
SendException exception) |
void |
actOnPostponeRequired(Mail mail,
PostponeException e) |
void |
actOnRecipientsWereRejected(Mail mail,
RecipientsWereRejectedException exception) |
void |
setDelayReportPoint(int index) |
void |
setDelayReportPoints(java.util.List<Integer> delayReportPoints) |
void |
setDsnMailCreator(DsnMailCreator dsnMailCreator) |
void |
setDsnTransmitter(Transmitter dsnTransmitter) |
void |
setRetryPeriods(java.util.List<org.joda.time.Period> retryPeriods) |
void |
setRetryTransmitter(Transmitter retryTransmitter) |
public RetryPolicy()
public RetryPolicy(DsnMailCreator dsnMailCreator, Transmitter dsnTransmitter, Transmitter retryTransmitter)
public void actOnEntireMailFailure(Mail mail, SendException exception) throws LocalMailSystemException
LocalMailSystemException
- if a bounce (DSN) mail cannot be created or passed to a queuepublic void actOnRecipientsWereRejected(Mail mail, RecipientsWereRejectedException exception) throws LocalMailSystemException
LocalMailSystemException
- if a bounce (DSN) mail cannot be created or passed to a queuepublic void actOnPostponeRequired(Mail mail, PostponeException e) throws LocalMailSystemException
LocalMailSystemException
public void setRetryPeriods(java.util.List<org.joda.time.Period> retryPeriods)
public void setDelayReportPoints(java.util.List<Integer> delayReportPoints)
public void setDelayReportPoint(int index)
public void setDsnMailCreator(DsnMailCreator dsnMailCreator)
public void setDsnTransmitter(Transmitter dsnTransmitter)
public void setRetryTransmitter(Transmitter retryTransmitter)