docs

# BehaviourWithFSMStateHandlerHolder

class BehaviourWithFSMStateHandlerHolder < I : O , O : State>( inputKlass: KClass < I >, strict: Boolean = false, delegateTo: BehaviourWithFSMStateHandler < I , O >) : CheckableHandlerHolder< O , O > , BehaviourWithFSMStateHandler < O , O >
Content copied to clipboard

Special holder for BehaviourContextWithFSM. This holder helps BehaviourContextWithFSM to understand whether it can handle input State with delegateTo or not

## Parameters

inputKlass

This KClass will be used to compare input State type and declare ability of delegateTo to handle incoming State. See checkHandleable for more info

strict

This flag will be used in checkHandleable to choose strategy of checking incoming State

delegateTo

This handler will be called in case checkHandleable returns true with class caster incoming State in handleState

## Constructors

BehaviourWithFSMStateHandlerHolder
Link copied to clipboard
fun < I : O , O : State> BehaviourWithFSMStateHandlerHolder ( inputKlass: KClass < I >, strict: Boolean = false, delegateTo: BehaviourWithFSMStateHandler < I , O >)
Content copied to clipboard

## Functions

checkHandleable
Link copied to clipboard
open suspend override fun checkHandleable (state: O ): Boolean
Content copied to clipboard

Check ability of delegateTo to handle this state

handleState
Link copied to clipboard
open suspend override fun StatesMachine<in O >. handleState (state: O ): O ?
Content copied to clipboard
open suspend override fun BehaviourContextWithFSM <in O >. handleState (state: O ): O ?
Content copied to clipboard

Handling of state :)