public class StateWaiter extends java.lang.Object implements ControllerListener
Constructor and Description |
---|
StateWaiter(Controller controller)
Construct a StateWaiter object for the given Controller
|
Modifier and Type | Method and Description |
---|---|
boolean |
blockingConfigure() |
boolean |
blockingPrefetch()
Calls prefetch() on the Controller and blocks the current thread
until the Controller is Prefetched.
|
boolean |
blockingRealize()
Calls realize() on the Controller and blocks the current thread
until the Controller is Realized.
|
boolean |
blockingStart()
Casts the Controller to a Player, calls start(), and
blocks the current thread until the player is Started.
|
boolean |
blockingSyncStart(Time t)
Calls syncStart() on the Controller and blocks the current thread
until the Controller is Started.
|
boolean |
blockingWait(int state) |
void |
controllerUpdate(ControllerEvent event)
Listens for a transition to the state that this
StateWaiter is waiting for.
|
public StateWaiter(Controller controller)
controller
- the Controller on which to wait for the desired statepublic void controllerUpdate(ControllerEvent event)
controllerUpdate
in interface ControllerListener
event
- the media eventpublic boolean blockingRealize()
public boolean blockingPrefetch()
public boolean blockingStart()
java.lang.ClassCastException
- If the Controller is not a Playerpublic boolean blockingSyncStart(Time t)
public boolean blockingConfigure()
public boolean blockingWait(int state)