|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.googlecode.jinahya.util.fsm.Machine
public class Machine
A Finite State Machine.
| Constructor Summary | |
|---|---|
Machine(MachineContext context)
Creates a new instance. |
|
| Method Summary | |
|---|---|
State |
getState()
Returns current state. |
protected boolean |
isAllowed(Transition transition)
Checks if given transition is allowed. |
boolean |
isFinished()
Returns finished flag value. |
protected boolean |
isFinishing(Transition transition)
Checks if given transition is an finishing condition. |
boolean |
isStarted()
Returns started flag value. |
protected boolean |
isStarting(Transition transition)
Checks if given transition is a starting condition. |
void |
setState(State state)
Sets state. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Machine(MachineContext context)
context - task context| Method Detail |
|---|
public State getState()
public void setState(State state)
throws FSMException
state - new state
FSMException - if an error occurs.public final boolean isStarted()
started flag value.
public final boolean isFinished()
finished flag value.
protected boolean isStarting(Transition transition)
transition is a starting condition.
Default implementation always returns true. Override this
method if customizations are needed.
transition - transition to check
protected boolean isAllowed(Transition transition)
transition is allowed. Default
implementation always returns true. Override this method if
customizations are needed.
transition - transition to check.
protected boolean isFinishing(Transition transition)
transition is an finishing condition.
Default implementation always returns false. Override this
method if customizations are needed.
transition - transition to check
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||