|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
ejel.SenderThread
public class SenderThread
A dedicated thread for sending incoming emails from the sender engine
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
SenderThread()
SenderThread default constructor |
|
| Method Summary | |
|---|---|
void |
exitThread()
This will terminate the thread loop and finish it |
Attachment[] |
getAttachments()
Get the Attachment array representing attached files to the current email |
boolean |
getDebug()
Get the current debug flag of the SenderThread object |
Email |
getEmail()
Get the Email object used to send the current email |
EmailAccount |
getEmailAccount()
Get the EmailAccount object used to send the current email |
java.lang.Exception |
getException()
Get the exception object occured while sending the current email or null on success |
Recipient[] |
getRecipients()
Get the Recipient array representing the recipients of the current email |
SenderEngine.RecipientsType |
getRecipientsType()
Gets the recipients type of the emails to be sent |
java.lang.Boolean |
isBusy()
true if the SenderThread is busy because it's sending now an email |
boolean |
isChecked()
|
boolean |
isFinished()
Returns true if the internal loop thread is finished |
java.lang.Boolean |
isReady()
true if the SenderThread is ready to send the next email, false if not |
java.lang.Boolean |
isSuccess()
true if the current email was sent, false if an exception occured. |
void |
run()
The internal thread loop for sending emails |
void |
sendEmail(EmailAccount server,
Recipient[] rcpts,
Email email,
Attachment[] atchmnts)
Enqueue a new email objects to be sent by the internal thread loop |
void |
sendEmailAgain()
Try to send the same email again after an exception |
void |
setChecked()
|
void |
setDebug(boolean dbg)
Set or unset the debug flag of the object. |
void |
setRecipientsType(SenderEngine.RecipientsType rcptsType)
Sets the recipients type of the emails to be sent |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SenderThread()
| Method Detail |
|---|
public boolean isChecked()
public void setChecked()
public void setRecipientsType(SenderEngine.RecipientsType rcptsType)
rcptsType - Type of the recipients TO, CC or BCCpublic SenderEngine.RecipientsType getRecipientsType()
public boolean isFinished()
public void setDebug(boolean dbg)
dbg - If set to true, SenderThread will print debug informationpublic boolean getDebug()
public void sendEmail(EmailAccount server,
Recipient[] rcpts,
Email email,
Attachment[] atchmnts)
throws java.lang.IllegalArgumentException
server - The email account to be used to send the emailrcpts - The Recipient array of recipients email addressesemail - The email object representing the email to sendatchmnts - The Attachment array of the email attached files
java.lang.IllegalArgumentExceptionpublic void sendEmailAgain()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void exitThread()
public Email getEmail()
public EmailAccount getEmailAccount()
public Recipient[] getRecipients()
public Attachment[] getAttachments()
public java.lang.Boolean isSuccess()
public java.lang.Exception getException()
public java.lang.Boolean isReady()
public java.lang.Boolean isBusy()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||