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 Loggerloggercreate a static logger.static longSLEEP_BETWEEN_MAIL_SECstatic longSLEEP_BETWEEN_MAILING_SECBooleanstop-
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 StringextractContent(Mailing mailing)List<Mailing>getMailingList()return the list of mailing id stored in this webapps.voidrun()voidsendMailing(Mailing mailing)voidsendReport(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:
IOExceptionConfigurationException
-
sendReport
public void sendReport(Mailing mailing) throws IOException
- Throws:
IOException
-
sendMailing
public void sendMailing(Mailing mailing) throws IOException, InterruptedException, javax.mail.MessagingException
- Throws:
IOExceptionInterruptedExceptionjavax.mail.MessagingException
-
-