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
- InvalidStateException
public int getValue()
public void breakWaiting()
public boolean waitForState(int state) throws InvalidStateException, java.lang.InterruptedException
state
- InvalidStateException
java.lang.InterruptedException
public boolean waitForState(int state, long timeout) throws InvalidStateException, java.lang.InterruptedException
state
- timeout
- InvalidStateException
java.lang.InterruptedException
public int waitForStateUpdate() throws java.lang.InterruptedException
java.lang.InterruptedException
Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.