public class MailThread
extends java.lang.Thread
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
private class |
MailThread.ScheduledMailTask
A timer task used to send a scheduled email.
|
Modifier and Type | Field and Description |
---|---|
protected MailMessage |
ivMailMessage
The message to email.
|
private java.util.Date |
ivWhen
The date and time when the email is to be sent.
|
private static long |
serialVersionUID
The class' serialization version id.
|
Constructor and Description |
---|
MailThread(MailMessage message)
Constructs a
MailThread object with the required parameters. |
MailThread(MailMessage message,
java.util.Date when)
Constructs a
MailThread object with the required parameters. |
Modifier and Type | Method and Description |
---|---|
void |
run()
Does the work of the command by sending the email.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
private static final long serialVersionUID
protected MailMessage ivMailMessage
private java.util.Date ivWhen
public MailThread(MailMessage message)
MailThread
object with the required parameters.
Requires start() to be invoked in order to process the command.message
- (MailMessage) The message to be sent.public MailThread(MailMessage message, java.util.Date when)
MailThread
object with the required parameters.
start() must not be invoked when using this constructor.message
- (MailMessage) The message to be sent.when
- (java.util.Date) The date and time when the message is to
be sent.