Package rs.mail.queue
Class MailQueueAdapter
java.lang.Object
rs.mail.queue.MailQueueAdapter
- All Implemented Interfaces:
MailQueueListener
Default implementation of the
MailQueueListener interface.
This implementation only writes the information into the log (debug, info and error).
- Author:
- ralph
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.slf4j.LoggergetLog()Returns the log.voidInforms that a message could not be sent.voidInforms that a message was added to the queue.voidInforms that the message is now being sent.voidInforms that a message was sent successfully.
-
Constructor Details
-
MailQueueAdapter
public MailQueueAdapter()Constructor. -
MailQueueAdapter
public MailQueueAdapter(org.slf4j.Logger log) Constructor.- Parameters:
log- - external logger to be used
-
-
Method Details
-
getLog
public org.slf4j.Logger getLog()Returns the log.- Returns:
- the log
-
onQueued
Informs that a message was added to the queue.- Specified by:
onQueuedin interfaceMailQueueListener- Parameters:
referenceId- - the reference ID of the message
-
onSending
Informs that the message is now being sent.- Specified by:
onSendingin interfaceMailQueueListener- Parameters:
referenceId- - the reference ID of the message
-
onSent
Informs that a message was sent successfully.- Specified by:
onSentin interfaceMailQueueListener- Parameters:
referenceId- - the reference ID of the message
-
onFailed
Informs that a message could not be sent.- Specified by:
onFailedin interfaceMailQueueListener- Parameters:
referenceId- - the reference ID of the messagefailedAttempts- - the number of failed attemptsreason- - reason string why it failed
-