Package io.hektor.fsm
Interface TransitionListener<S extends Enum<S>>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
Modifier and TypeMethodDescriptionvoidonTransition(S currentState, S toState, Object event) Will be invoked just before theTransitionis executed by theFSM.
-
Method Details
-
onTransition
Will be invoked just before theTransitionis executed by theFSM. If this method throws an exception, it will be ignored and theTransitionwill still be executed. However, if an exception is thrown, it will be logged on WARN and you really should check what on earth you are doing.- Parameters:
currentState- the state we are transitioning from, i.e. the current state.toState- the state we will be transitioning to, which could be the same as the current state.event- the event that triggere this transition.
-