@FunctionalInterface public interface TransitionListener<S extends Enum<S>>
| Modifier and Type | Method and Description |
|---|---|
void |
onTransition(S currentState,
S toState,
Object event)
Will be invoked just before the
Transition is executed by
the FSM. |
void onTransition(S currentState, S toState, Object event)
Transition is executed by
the FSM. If this method throws an exception, it will be ignored
and the Transition will 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.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.Copyright © 2019. All rights reserved.