|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.fmj.ejmf.toolkit.util.StateWaiter
public class StateWaiter
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
Constructor Summary | |
---|---|
StateWaiter(Controller controller)
Construct a StateWaiter object for the given Controller |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StateWaiter(Controller controller)
controller
- the Controller on which to wait for the desired stateMethod Detail |
---|
public 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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |