org.mmbase.module.builders
Class EmailSendProbe
java.lang.Object
|
+--org.mmbase.module.builders.EmailSendProbe
- All Implemented Interfaces:
- java.lang.Runnable
- public class EmailSendProbe
- extends java.lang.Object
- implements java.lang.Runnable
Email send probe, keeps a queue of queued messages
and uses a wait/nofity on its internal thread as
a way to block until the next event or notify of
a possible queue change.
- Version:
- 15 May 2001
- Author:
- Daniel Ockeloen
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tasks
public SortedVector tasks
internalqueuesize
public int internalqueuesize
maxtasktime
public int maxtasktime
dbqueued
public int dbqueued
queueprobetime
public int queueprobetime
EmailSendProbe
public EmailSendProbe(Email parent)
- construct the probe
init
public void init()
- init/start the probe
start
public void start()
- Starts the thread
stop
public void stop()
- Stops the admin Thread.
run
public void run()
- blocks on the first task in the queue
this is the core of the queue, the idea is that
we block on the first node that needs to be mailed
do a wait on it until its ready. If no node is found
we block for a hour. if we reach a time we perform
a call on our parent and remove ourselfs from the queue
- Specified by:
run in interface java.lang.Runnable
putTask
public boolean putTask(MMObjectNode node)
containsTask
public boolean containsTask(MMObjectNode node)
replaceTask
public boolean replaceTask(MMObjectNode node)
checkQueue
public void checkQueue()
MMBase 2001