Package org.javlo.mailing
Class MailingThread
- java.lang.Object
-
- java.lang.Thread
-
- org.javlo.mailing.MailingThread
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected static Logger
logger
create a static logger.static long
SLEEP_BETWEEN_MAIL_SEC
static long
SLEEP_BETWEEN_MAILING_SEC
Boolean
stop
-
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description MailingThread(javax.servlet.ServletContext inApplication)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
extractContent(Mailing mailing)
List<Mailing>
getMailingList()
return the list of mailing id stored in this webapps.void
run()
void
sendMailing(Mailing mailing)
void
sendReport(Mailing mailing)
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Method Detail
-
getMailingList
public List<Mailing> getMailingList() throws IOException
return the list of mailing id stored in this webapps.- Throws:
IOException
ConfigurationException
-
sendReport
public void sendReport(Mailing mailing) throws IOException
- Throws:
IOException
-
sendMailing
public void sendMailing(Mailing mailing) throws IOException, InterruptedException, javax.mail.MessagingException
- Throws:
IOException
InterruptedException
javax.mail.MessagingException
-
-