The StateWaiter class provides routines to allow the current thread to wait for a Controller to reach a particular state. A StateWaiter object will first register itself as a ControllerListener on the given Controller object. It will then set the state to be waited for, and block the current thread until either
- the Controller posts a TransitionEvent indicating that it has moved to the desired state, or
- the Controller posts a ControllerErrorEvent, indicating that an error occurred andthe transition failed
From the book: Essential JMF, Gordon, Talley (ISBN 0130801046). Used with permission.
@author Steve Talley and Rob Gordon