Package org.glassfish.pfl.basic.fsm
Interface Action
-
- All Known Implementing Classes:
Action.Base
public interface Action
An Action may be associated with a transition between to states. The transition action doIt method is called before the transition takes place.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Action.Base
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
doIt(FSM fsm, Input in)
Called by the state engine to perform an action before a state transition takes place.
-
-
-
Method Detail
-
doIt
void doIt(FSM fsm, Input in)
Called by the state engine to perform an action before a state transition takes place. The FSM is passed so that the Action may examine the state of the FSM. Note that an action should complete in a timely manner. If the state machine is used for concurrency control with multiple threads, the action must not allow multiple threads to run simultaneously in the state machine, as the state could be corrupted. Any exception thrown by the Action for the transition will be propagated to doIt.- Parameters:
fsm
- is the state machine causing this action.in
- is the input that caused the transition.
-
-