Behaviour With FSMState Handler Holder
class BehaviourWithFSMStateHandlerHolder<I : State>(inputKlass: KClass<I>, strict: Boolean, delegateTo: BehaviourWithFSMStateHandler<I>)
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
input Klass
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
delegate To
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 : State> BehaviourWithFSMStateHandlerHolder(inputKlass: KClass<I>, strict: Boolean = false, delegateTo: BehaviourWithFSMStateHandler<I>)
Content copied to clipboard
Functions
check Handleable
Link copied to clipboard
Check ability of delegateTo to handle this state
handle State
Link copied to clipboard
suspend fun BehaviourContextWithFSM.handleState(contextUpdatesFlow: Flow<Update>, state: State): State?
Content copied to clipboard
Handling of state :)