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.
- Author:
- Ken Cavanaugh
|
Method Summary |
void |
doIt(FSM fsm,
Input in)
Called by the state engine to perform an action
before a state transition takes place. |
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.
Copyright © 2013 Oracle. All Rights Reserved.