Package mireka.transmission.queuing
Class RetryPolicy
- Object
-
- mireka.transmission.queuing.RetryPolicy
-
public class RetryPolicy extends ObjectRetryPolicy decides what actions are necessary after a transmission attempt failed and executes those actions.
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactOnEntireMailFailure(Mail mail, SendException exception)voidactOnPostponeRequired(Mail mail, PostponeException e)voidactOnRecipientsWereRejected(Mail mail, RecipientsWereRejectedException exception)voidsetDelayReportPoint(int index)voidsetDelayReportPoints(java.util.List<Integer> delayReportPoints)voidsetDsnMailCreator(DsnMailCreator dsnMailCreator)voidsetDsnTransmitter(Transmitter dsnTransmitter)voidsetRetryPeriods(java.util.List<org.joda.time.Period> retryPeriods)voidsetRetryTransmitter(Transmitter retryTransmitter)
-
-
-
Constructor Detail
-
RetryPolicy
public RetryPolicy()
Constructs a new empty instance, required attributes must be passed using the setter methods later.
-
RetryPolicy
public RetryPolicy(DsnMailCreator dsnMailCreator, Transmitter dsnTransmitter, Transmitter retryTransmitter)
Constructs a new instance with all required dependencies.
-
-
Method Detail
-
actOnEntireMailFailure
public void actOnEntireMailFailure(Mail mail, SendException exception) throws LocalMailSystemException
- Throws:
LocalMailSystemException- if a bounce (DSN) mail cannot be created or passed to a queue
-
actOnRecipientsWereRejected
public void actOnRecipientsWereRejected(Mail mail, RecipientsWereRejectedException exception) throws LocalMailSystemException
- Throws:
LocalMailSystemException- if a bounce (DSN) mail cannot be created or passed to a queue
-
actOnPostponeRequired
public void actOnPostponeRequired(Mail mail, PostponeException e) throws LocalMailSystemException
- Throws:
LocalMailSystemException
-
setRetryPeriods
public void setRetryPeriods(java.util.List<org.joda.time.Period> retryPeriods)
- Category:
- GETSET
-
setDelayReportPoints
public void setDelayReportPoints(java.util.List<Integer> delayReportPoints)
- Category:
- GETSET
-
setDelayReportPoint
public void setDelayReportPoint(int index)
- Category:
- GETSET
-
setDsnMailCreator
public void setDsnMailCreator(DsnMailCreator dsnMailCreator)
- Category:
- GETSET
-
setDsnTransmitter
public void setDsnTransmitter(Transmitter dsnTransmitter)
- Category:
- GETSET
-
setRetryTransmitter
public void setRetryTransmitter(Transmitter retryTransmitter)
- Category:
- GETSET
-
-