1   package com.atlassian.mail.queue;
2   
3   import com.atlassian.core.task.Task;
4   import com.atlassian.mail.MailException;
5   
6   /**
7    * Created by IntelliJ IDEA.
8    * User: Mike Cannon-Brookes
9    * Date: Jan 22, 2003
10   * Time: 12:55:18 AM
11   * To change this template use Options | File Templates.
12   */
13  public interface MailQueueItem extends Task, Comparable<MailQueueItem>
14  {
15      /**
16       * Attempt to send the  mail item.
17       * @throws com.atlassian.mail.MailException If there is a problem sending the mail item
18       */
19      void send() throws MailException;
20  
21      /**
22       * @return String the Subject of the mail item.
23       */
24      public String getSubject();
25  
26      /**
27       * @return java.util.Date the date the item was last put in the queue
28       */
29      public java.util.Date getDateQueued();
30  
31      /**
32       * @return int the number of times the item has attempted to be sent
33       */
34      public int getSendCount();
35  
36      /**
37       * @return If there was a problem sending the item
38       */
39      public boolean hasError();
40  }