cz.cuni.amis.fsm
Interface IFSMTransition<SYMBOL,CONTEXT>

Type Parameters:
SYMBOL -
CONTEXT -
All Known Implementing Classes:
GameInfoTransition, HandshakeEndTransition, InitRequestedTransition, ReadyRequestedTransition

public interface IFSMTransition<SYMBOL,CONTEXT>

Interface for the fsm transition. Note that this transition doesn't really describe target state nor symbols of the transition. It's used only if you need to perform certain operations when some transitions are triggered. You have to reference implementation of this interface in the map() part of the FSMState annotations transition() of the FSMTransition annotation respectively.


Method Summary
 void init(CONTEXT context)
          Called when the certain FSM (the transition belongs to) is created.
 void restart(CONTEXT context)
          Called every time somebody restarts the FSM the transition belongs to.
 void stepped(CONTEXT context, IFSMState<SYMBOL,CONTEXT> fromState, SYMBOL bySymbol, IFSMState<SYMBOL,CONTEXT> toState)
          Method that is called when the transition is triggered.
 

Method Detail

stepped

void stepped(CONTEXT context,
             IFSMState<SYMBOL,CONTEXT> fromState,
             SYMBOL bySymbol,
             IFSMState<SYMBOL,CONTEXT> toState)
Method that is called when the transition is triggered.

Parameters:
context -
fromState -
bySymbol -
toState -

init

void init(CONTEXT context)
Called when the certain FSM (the transition belongs to) is created.

Parameters:
context -

restart

void restart(CONTEXT context)
Called every time somebody restarts the FSM the transition belongs to.

Parameters:
context -