|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.pfl.basic.fsm.NameBase
org.glassfish.pfl.basic.fsm.State
public class State
Base class for all states in a StateEngine. This must be used as the base class for all states in transitions added to a StateEngine.
| Nested Class Summary | |
|---|---|
static class |
State.Kind
Kind of state. |
| Constructor Summary | |
|---|---|
State(Set<State> states,
String name)
|
|
State(Set<State> states,
String name,
State.Kind kind)
|
|
State(String name)
|
|
State(String name,
State.Kind kind)
|
|
| Method Summary | |
|---|---|
Action |
getDefaultAction()
Get the default transition action that is used if the default next state is used. |
State |
getDefaultNextState()
Return the default next state for this state. |
Map<Input,Set<Transition>> |
getInputMap()
|
State.Kind |
getKind()
Return the Kind of this state. |
void |
postAction(FSM fsm)
Method that defines action that occurs whenever this state is exited, that is, when the state is changed from this state to a new state. |
FSM |
preAction(FSM fsm)
Method that defines action that occurs whenever this state is entered from a different state. |
State |
returnAction(FSM fsm,
FSM nestedFSM)
If this state has Kind REFERENCE, and its preAction pushes a nested FSM onto the stack, the returnAction method is called after the nested FSM reaches a final state. |
| Methods inherited from class org.glassfish.pfl.basic.fsm.NameBase |
|---|
getName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public State(String name)
public State(String name,
State.Kind kind)
public State(Set<State> states,
String name)
public State(Set<State> states,
String name,
State.Kind kind)
| Method Detail |
|---|
public State.Kind getKind()
public FSM preAction(FSM fsm)
Any exceptions except ThreadDeath thrown by this method are ignored. This method can be overridden in a state implementation if needed.
public State returnAction(FSM fsm,
FSM nestedFSM)
If the returnAction method sets the state to a new state, the postAction method is called as usuTransition.
Any exceptions except ThreadDeath thrown by this method are ignored. This method can be overridden in a state implementation if needed.
public void postAction(FSM fsm)
Any exceptions except ThreadDeath thrown by this method are ignored. This method can be overridden in a state implementation if needed.
public State getDefaultNextState()
public Action getDefaultAction()
public Map<Input,Set<Transition>> getInputMap()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||