org.silverpeas.mail.engine
Class MailSenderThread
java.lang.Object
java.lang.Thread
org.silverpeas.mail.engine.MailSenderThread
- All Implemented Interfaces:
- Runnable
public class MailSenderThread
- extends Thread
A thread MailSenderThread in the background a batch of mail sending. All the public methods
are static, so only one thread runs and processes the mail sending.
When it get no more mail to send, the thread ends a new one will be instantiated on the next
mail sending request.
Priority is given to synchronous mail sending request.
Methods inherited from class java.lang.Thread |
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 |
addMailToSend
public static void addMailToSend(MailToSend mailToSend)
- Add a mail to send.
- Parameters:
mailToSend
-
run
public void run()
- Process all the requests. This method should be private but is already declared public in the
base class Thread.
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
Copyright © 2016 Silverpeas. All Rights Reserved.