Package org.glassfish.pfl.basic.fsm
Class FSMImpl
java.lang.Object
org.glassfish.pfl.basic.fsm.FSMImpl
- All Implemented Interfaces:
FSM
This is the main class that represents an instance of a state machine
using a state engine. It may be used as a base class, in which case
the guards and actions have access to the derived class.
Note that this is optional; an FSM implementation may directly
implement the FSM interface if desired.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the parent state machine.getState()
Return the current state.Return the state engine used to create this FSM.void
Set the parent state machine.void
Set the current state of this FSM.
-
Field Details
-
parent
-
state
-
stateEngine
-
-
Constructor Details
-
FSMImpl
-
-
Method Details
-
getParent
Description copied from interface:FSM
Get the parent state machine. -
setParent
Description copied from interface:FSM
Set the parent state machine. -
getStateEngine
Description copied from interface:FSM
Return the state engine used to create this FSM.- Specified by:
getStateEngine
in interfaceFSM
-
getState
Return the current state. -
setState
Description copied from interface:FSM
Set the current state of this FSM. May not be called inside a transition action, or from a State method. Only here for use by the StateEngine.
-