public abstract class State
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected int |
state |
| Constructor and Description |
|---|
State(int initialState)
Creates a new State object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
breakWaiting() |
int |
getValue() |
abstract boolean |
isValidState(int state) |
void |
setValue(int state) |
boolean |
waitForState(int state) |
boolean |
waitForState(int state,
long timeout) |
int |
waitForStateUpdate() |
public State(int initialState)
initialState - public abstract boolean isValidState(int state)
state - public void setValue(int state)
throws InvalidStateException
state - InvalidStateExceptionpublic int getValue()
public void breakWaiting()
public boolean waitForState(int state)
throws InvalidStateException,
java.lang.InterruptedException
state - InvalidStateExceptionjava.lang.InterruptedExceptionpublic boolean waitForState(int state,
long timeout)
throws InvalidStateException,
java.lang.InterruptedException
state - timeout - InvalidStateExceptionjava.lang.InterruptedExceptionpublic int waitForStateUpdate()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionCopyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.