|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread toolbox.queueing.Listener
public class Listener
The listener class provides a mechanism for dispatching events from the Queue class and a common way of handling events dispatched from the Queue class.
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 | |
---|---|
Listener(Queue queue,
java.lang.ThreadGroup thrdGrp,
int instance,
Worker worker)
Constructs a new Listener. |
Method Summary | |
---|---|
void |
destroy()
Destroys the Listener by destroying the member worker. |
void |
run()
Dispatches events from the event queue and presents them to the member Worker. |
void |
stopListener()
Stops the listener by flushing the event queue. |
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, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Listener(Queue queue, java.lang.ThreadGroup thrdGrp, int instance, Worker worker)
queue
- Event queue.thrdGrp
- ThreadGroup to add listener to. Applications that extend
the listener class must provide a thread group to add
the listener to.instance
- Listener instance count used to name listeners. Must
provided by the calling class.worker
- Worker implementation to perform tasks.Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void stopListener()
public void destroy()
destroy
in class java.lang.Thread
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |