| java.lang.Object com.sun.midp.automation.AutoStateTracker
AutoStateTracker | class AutoStateTracker (Code) | | Utility class for tracking states
|
AutoStateTracker | AutoStateTracker(Object initialState)(Code) | | Constructor
Parameters: initialState - initial state |
getCurrentState | final Object getCurrentState()(Code) | | Returns current state.
current state |
interruptWait | final void interruptWait()(Code) | | Interrupts waiters
|
isStateReached | protected boolean isStateReached(Object state)(Code) | | Checks condition waiters are waiting for:
specified state has been reached.
Assumption: 'this' lock is already taken.
Parameters: state - state to check againts true, if specified state has been reached |
setCurrentState | final void setCurrentState(Object state, boolean interrupt)(Code) | | Sets a state.
Assumption: only one thread sets a state,
'this' lock shouldn't be already taken.
Parameters: state - state to set as current Parameters: interrupt - if true, interrupt all waiters after setting a state. |
waitFor | final void waitFor(Object state)(Code) | | Waits until specified state has been reached.
Parameters: state - state to wait for |
|
|