Listener

interface Listener

Provides StateMachine specific notifications and also duplicates IState.Listener and Transition.Listener functionality allowing to listen all notifications in one place if necessary.

Functions

Link copied to clipboard
open suspend fun onDestroyed()

Notifies that state machine has destroyed.

Link copied to clipboard
open suspend fun onStarted(transitionParams: TransitionParams<*>)

Notifies that state machine started (entered initial state).

Link copied to clipboard
open suspend fun onStateEntry(state: IState, transitionParams: TransitionParams<*>)

Notifies about any child state entry (including nested states).

Link copied to clipboard
open suspend fun onStateExit(state: IState, transitionParams: TransitionParams<*>)
Link copied to clipboard
open suspend fun onStateFinished(state: IState, transitionParams: TransitionParams<*>)
Link copied to clipboard
open suspend fun onStopped()

Notifies that state machine has stopped.

Link copied to clipboard
open suspend fun onTransitionComplete(activeStates: Set<IState>, transitionParams: TransitionParams<*>)

Same as onTransitionTriggered but called after transition is complete and provides set of current active states.

Link copied to clipboard
open suspend fun onTransitionTriggered(transitionParams: TransitionParams<*>)

This method is called when any transition is triggered/performed.