All Packages Class Hierarchy This Package Previous Next Index
Class ejmf.toolkit.media.ThreadQueue
java.lang.Object
|
+----java.lang.Thread
|
+----ejmf.toolkit.media.ThreadQueue
- public class ThreadQueue
- extends Thread
The ThreadQueue class provides a mechanism to run threads
serially. When a thread is added, it will be started as soon
as all threads added before it have completed.
-
ThreadQueue()
- Constructs a ThreadQueue.
-
addThread(Thread)
- Add a thread to this ThreadQueue.
-
run()
- Monitor the thread queue.
-
stopThreads()
- Stop the currently running thread and any threads
queued to run.
ThreadQueue
public ThreadQueue()
- Constructs a ThreadQueue.
run
public void run()
- Monitor the thread queue. When a thread is added, start
it and block until it finishes.
This method is called when the thread is started. It
should not be called directly.
- Overrides:
- run in class Thread
addThread
public synchronized void addThread(Thread t)
- Add a thread to this ThreadQueue.
- Parameters:
- t
- The Thread to add.
stopThreads
public synchronized void stopThreads()
- Stop the currently running thread and any threads
queued to run. Remove all threads from the queue.
All Packages Class Hierarchy This Package Previous Next Index