@Role
public interface MailListener
Modifier and Type | Method and Description |
---|---|
MailStatusResult |
getMailStatusResult() |
void |
onPrepareBegin(String batchId,
Map<String,Object> parameters)
Called when the preparation phase begins.
|
void |
onPrepareEnd(Map<String,Object> parameters)
Called when the preparation phase is finished.
|
void |
onPrepareFatalError(Exception exception,
Map<String,Object> parameters)
Called when the preparation phase has encounter a fatal error.
|
void |
onPrepareMessageError(ExtendedMimeMessage message,
Exception e,
Map<String,Object> parameters)
Called when a mail has failed to be prepared.
|
void |
onPrepareMessageSuccess(ExtendedMimeMessage message,
Map<String,Object> parameters)
Called when a mail has been prepared with success.
|
void |
onSendMessageError(ExtendedMimeMessage message,
Exception exception,
Map<String,Object> parameters)
Called when a mail has failed to be sent.
|
void |
onSendMessageFatalError(String uniqueMessageId,
Exception exception,
Map<String,Object> parameters)
Called when a message could not be retrieve for sending.
|
void |
onSendMessageSuccess(ExtendedMimeMessage message,
Map<String,Object> parameters)
Called when a mail has been sent successfully.
|
void onPrepareBegin(String batchId, Map<String,Object> parameters)
batchId
- identifier of the batch being preparedparameters
- some parameters specifying addition context datavoid onPrepareMessageSuccess(ExtendedMimeMessage message, Map<String,Object> parameters)
message
- the message to be sentparameters
- some parameters specifying addition context datavoid onPrepareMessageError(ExtendedMimeMessage message, Exception e, Map<String,Object> parameters)
message
- the message that was tried to be preparede
- the exception explaining why the message couldn't be sentparameters
- some parameters specifying addition context datavoid onPrepareFatalError(Exception exception, Map<String,Object> parameters)
exception
- the exception explaining why messages couldn't be preparedparameters
- some parameters specifying addition context datavoid onPrepareEnd(Map<String,Object> parameters)
parameters
- some parameters specifying addition context datavoid onSendMessageSuccess(ExtendedMimeMessage message, Map<String,Object> parameters)
message
- the message sentparameters
- some parameters specifying addition context datavoid onSendMessageError(ExtendedMimeMessage message, Exception exception, Map<String,Object> parameters)
message
- the message that was tried to be sentexception
- the exception explaining why the message couldn't be sentparameters
- some parameters specifying addition context datavoid onSendMessageFatalError(String uniqueMessageId, Exception exception, Map<String,Object> parameters)
uniqueMessageId
- the unique message identifier that was tried to be load for sendingexception
- the exception explaining why the message couldn't be sentparameters
- some parameters specifying addition context dataMailStatusResult getMailStatusResult()
MailStatusResult.waitTillProcessed(long)
or MailStatusResult.isProcessed()
to ensure that all mails have been processedCopyright © 2004–2022 XWiki. All rights reserved.