Class ControllerEventQueue

  extended by java.lang.Thread
      extended by
All Implemented Interfaces:

public class ControllerEventQueue
extends java.lang.Thread

This class provides a dispatching mechanism for ControllerEvents. All events posted to this queue are dispatched to a Vector of ControllerListeners given when the queue is constructed. Note that ControllerListeners may be added or removed from this Vector from outside of this class, and these changes will be reflected in the dispatching mechanism. From the book: Essential JMF, Gordon, Talley (ISBN 0130801046). Used with permission.

Steve Talley & Rob Gordon

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
Constructor Summary
ControllerEventQueue(java.util.Vector listeners, java.lang.String threadName)
          Construct a ControllerEventQueue for the given list of ControllerListeners.
Method Summary
 void postEvent(ControllerEvent event)
          Post a ControllerEvent to the queue.
 void run()
          Endlessly monitor the event queue.
Methods inherited from class java.lang.Thread
activeCount, checkAccess, 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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public ControllerEventQueue(java.util.Vector listeners,
                            java.lang.String threadName)
Construct a ControllerEventQueue for the given list of ControllerListeners.

listeners - The list of ControllerListeners to notify whenever a ControllerEvents is posted.
Method Detail


public void postEvent(ControllerEvent event)
Post a ControllerEvent to the queue. All listeners will be notified ASAP.


public void run()
Endlessly monitor the event queue. This method should not be called directly.

Specified by:
run in interface java.lang.Runnable
run in class java.lang.Thread