public class JiraMailQueue extends Object implements com.atlassian.mail.queue.MailQueue
MailQueue that ensures the baseURL for all e-mails is correct. When
sending e-mails the baseURL should always use JIRA's configured URL.| Constructor and Description |
|---|
JiraMailQueue(BaseUrl baseUrl) |
| Modifier and Type | Method and Description |
|---|---|
void |
addErrorItem(com.atlassian.mail.queue.MailQueueItem item) |
void |
addItem(com.atlassian.mail.queue.MailQueueItem item) |
void |
emptyErrorQueue() |
int |
errorSize() |
Queue<com.atlassian.mail.queue.MailQueueItem> |
getErrorQueue() |
com.atlassian.mail.queue.MailQueueItem |
getItemBeingSent() |
Queue<com.atlassian.mail.queue.MailQueueItem> |
getQueue() |
Timestamp |
getSendingStarted() |
boolean |
isSending() |
void |
resendErrorQueue() |
void |
sendBuffer()
When sending e-mails the
baseURL should always use JIRA's configured URL. |
void |
sendBufferBlocking() |
int |
size() |
void |
unstickQueue() |
public JiraMailQueue(BaseUrl baseUrl)
public void sendBuffer()
baseURL should always use JIRA's configured URL.
JIRA normally uses the incoming HTTP request to generate the baseURL. JIRA's configured baseURL is used
when no request exists (e.g. executing on a scheduled thread). This means that e-mails are normally rendered
using the configured static baseURL as they are sent in a scheduled task. This is the correct public URL
for e-mails.
It is also possible send e-mails on a thread with a request (e.g. MailQueueAdmin.jspa "Send Now", or REST send now).
In this case we want the baseURL to come from the configured baseURL and not from the HTTP request
to keep things consistent with the scheduled e-mail runner.
sendBuffer in interface com.atlassian.mail.queue.MailQueuepublic void sendBufferBlocking()
sendBufferBlocking in interface com.atlassian.mail.queue.MailQueuepublic int size()
size in interface com.atlassian.mail.queue.MailQueuepublic int errorSize()
errorSize in interface com.atlassian.mail.queue.MailQueuepublic void addItem(com.atlassian.mail.queue.MailQueueItem item)
addItem in interface com.atlassian.mail.queue.MailQueuepublic void addErrorItem(com.atlassian.mail.queue.MailQueueItem item)
addErrorItem in interface com.atlassian.mail.queue.MailQueuepublic Queue<com.atlassian.mail.queue.MailQueueItem> getQueue()
getQueue in interface com.atlassian.mail.queue.MailQueuepublic Queue<com.atlassian.mail.queue.MailQueueItem> getErrorQueue()
getErrorQueue in interface com.atlassian.mail.queue.MailQueuepublic boolean isSending()
isSending in interface com.atlassian.mail.queue.MailQueuepublic Timestamp getSendingStarted()
getSendingStarted in interface com.atlassian.mail.queue.MailQueuepublic void emptyErrorQueue()
emptyErrorQueue in interface com.atlassian.mail.queue.MailQueuepublic void resendErrorQueue()
resendErrorQueue in interface com.atlassian.mail.queue.MailQueuepublic com.atlassian.mail.queue.MailQueueItem getItemBeingSent()
getItemBeingSent in interface com.atlassian.mail.queue.MailQueuepublic void unstickQueue()
unstickQueue in interface com.atlassian.mail.queue.MailQueueCopyright © 2002-2019 Atlassian. All Rights Reserved.