public class

JiraMailQueue

extends Object
implements MailQueue
java.lang.Object
   ↳ com.atlassian.jira.mail.JiraMailQueue

Class Overview

A com.atlassian.mail.queue.MailQueue that ensures the baseURL for all e-mails is correct. When sending e-mails the baseURL should always use JIRA's configured URL.

Summary

Public Constructors
JiraMailQueue(BaseUrl baseUrl)
Public Methods
void addErrorItem(MailQueueItem item)
void addItem(MailQueueItem item)
void emptyErrorQueue()
int errorSize()
Queue<MailQueueItem> getErrorQueue()
MailQueueItem getItemBeingSent()
Queue<MailQueueItem> getQueue()
Timestamp getSendingStarted()
boolean isSending()
void resendErrorQueue()
void sendBuffer()
When sending e-mails the baseURL should always use JIRA's configured URL.
int size()
void unstickQueue()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.mail.queue.MailQueue

Public Constructors

public JiraMailQueue (BaseUrl baseUrl)

Public Methods

public void addErrorItem (MailQueueItem item)

public void addItem (MailQueueItem item)

public void emptyErrorQueue ()

public int errorSize ()

public Queue<MailQueueItem> getErrorQueue ()

public MailQueueItem getItemBeingSent ()

public Queue<MailQueueItem> getQueue ()

public Timestamp getSendingStarted ()

public boolean isSending ()

public void resendErrorQueue ()

public void sendBuffer ()

When sending e-mails the 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.

public int size ()

public void unstickQueue ()