public interface MailQueue
The MailQueue is used to asynchronously send mail from within applications.
It is populated with MailQueueItem objects, which know how to send themselves.
The queue also keeps track of which messages have attempted to be send, and were erroring.
| Modifier and Type | Method and Description |
|---|---|
void |
addErrorItem(MailQueueItem item)
Add an error item
|
void |
addItem(MailQueueItem item)
Add a new item to the mail queue.
|
void |
emptyErrorQueue()
Empty the error queue (discard these messages)
|
int |
errorSize() |
Queue<MailQueueItem> |
getErrorQueue()
Get access to the messages in the error queue.
|
MailQueueItem |
getItemBeingSent()
Retrieve the item currently being sent.
|
default Timestamp |
getLastSendingAttempt() |
Queue<MailQueueItem> |
getQueue()
Get access to the messages in the mail queue.
|
Timestamp |
getSendingStarted() |
boolean |
isSending() |
void |
resendErrorQueue()
Send all messages in the error queue.
|
void |
sendBuffer()
Send all the messages in the queue.
|
void |
sendBufferBlocking()
Send all the messages in the queue.
|
int |
size() |
void |
unstickQueue()
If the queue is sending and has 'stuck' on an item, this lets the queue proceed.
|
void sendBuffer()
void sendBufferBlocking()
int size()
int errorSize()
void addItem(MailQueueItem item)
item - The item to be added to the queue.void addErrorItem(MailQueueItem item)
item - a mail queue item to append to the "errorItems" listQueue<MailQueueItem> getQueue()
Get access to the messages in the mail queue.
Note: you should synchronize on access to this queue.
MailQueueItem objects representing messages in the mail queueQueue<MailQueueItem> getErrorQueue()
Get access to the messages in the error queue.
Note: you should synchronize on access to this queue.
MailQueueItem objects representing messages in the error queueboolean isSending()
Timestamp getSendingStarted()
default Timestamp getLastSendingAttempt()
void emptyErrorQueue()
void resendErrorQueue()
MailQueueItem getItemBeingSent()
MailQueueItem object representing a message currently being sent.void unstickQueue()
Copyright © 2024 Atlassian. All rights reserved.