Top Description Fields Constructors Methods
org.glassfish.pfl.basic.fsm

public Class FSMImpl

extends Object
implements FSM
Class Inheritance
All Implemented Interfaces
org.glassfish.pfl.basic.fsm.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.
Author
Ken Cavanaugh

Field Summary

Modifier and TypeField and Description
private FSM
private State
private StateEngine

Constructor Summary

AccessConstructor and Description
public
FSMImpl(StateEngine se, State initialState)

Method Summary

Modifier and TypeMethod and Description
public FSM
getParent()

Implements org.glassfish.pfl.basic.fsm.FSM.getParent.

Get the parent state machine.

public State
getState()

Implements org.glassfish.pfl.basic.fsm.FSM.getState.

Return the current state.

public StateEngine
getStateEngine()

Implements org.glassfish.pfl.basic.fsm.FSM.getStateEngine.

Return the state engine used to create this FSM.

public void
setParent(FSM fsm)

Implements org.glassfish.pfl.basic.fsm.FSM.setParent.

Set the parent state machine.

public void
setState(State nextState)

Implements org.glassfish.pfl.basic.fsm.FSM.setState.

Set the current state of this FSM.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

parentback to summary
private FSM parent
stateback to summary
private State state
stateEngineback to summary
private StateEngine stateEngine

Constructor Detail

FSMImplback to summary
public FSMImpl(StateEngine se, State initialState)

Method Detail

getParentback to summary
public FSM getParent()

Implements org.glassfish.pfl.basic.fsm.FSM.getParent.

Doc from org.glassfish.pfl.basic.fsm.FSM.getParent.

Get the parent state machine.

Annotations
@Override
getStateback to summary
public State getState()

Implements org.glassfish.pfl.basic.fsm.FSM.getState.

Return the current state.

Annotations
@Override
getStateEngineback to summary
public StateEngine getStateEngine()

Implements org.glassfish.pfl.basic.fsm.FSM.getStateEngine.

Doc from org.glassfish.pfl.basic.fsm.FSM.getStateEngine.

Return the state engine used to create this FSM.

Annotations
@Override
setParentback to summary
public void setParent(FSM fsm)

Implements org.glassfish.pfl.basic.fsm.FSM.setParent.

Doc from org.glassfish.pfl.basic.fsm.FSM.setParent.

Set the parent state machine.

Annotations
@Override
setStateback to summary
public void setState(State nextState)

Implements org.glassfish.pfl.basic.fsm.FSM.setState.

Doc from org.glassfish.pfl.basic.fsm.FSM.setState.

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.

Annotations
@Override