|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.liquidsite.util.mail.MailQueue
An outgoing email queue. This class is used for storing outgoing email messages for before being sent. Normally this queue should be empty, as queueing is performed in the receiving SMTP server. This queue is only used to reduce the reponse latency when processing web requests. The actual sending of the mails should be performed by a background thread.
| Method Summary | |
void |
add(MailMessage message)
Adds a new message to the queue. |
java.lang.String |
getFooter()
Returns the current mail footer. |
java.lang.String |
getHeader()
Returns the current mail header. |
static MailQueue |
getInstance()
Returns the mail queue instance. |
void |
initialize(java.lang.String host,
java.lang.String user,
java.lang.String from)
Initializes this mail queue. |
void |
process()
Processes the mail messages in the queue. |
void |
setFooter(java.lang.String footer)
Sets the mail footer. |
void |
setHeader(java.lang.String header)
Sets the mail header. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static MailQueue getInstance()
public void initialize(java.lang.String host,
java.lang.String user,
java.lang.String from)
host - the mail host, or null for "localhost"user - the mail user, or null for nonefrom - the mail from address, or null for nonepublic java.lang.String getHeader()
public void setHeader(java.lang.String header)
header - the new header, or null for defaultpublic java.lang.String getFooter()
public void setFooter(java.lang.String footer)
footer - the new footer, or null for default
public void add(MailMessage message)
throws MailMessageException
message - the message to add
MailMessageException - if the message wasn't valid or if
the queue was full
public void process()
throws MailTransportException
MailTransportException - if the mail transport couldn't
be initialized correctly
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||