EmittingHandler

class EmittingHandler<A, E>(collectWithChannel: (Flow<A>, FlowCollector<E>, Job) -> Unit, flow: MutableSharedFlow<E>) : Handler<A> , Flow<E>

An EmittingHandler is a special Handler that constitutes a new Flow by itself. You can emit values to this Flow from your code and connect it to other Handlers on this or on other Stores. This way inter-store-communication is done in fritz2.

Parameters

collectWithChannel

defines how to handle the values of the connected Flow

Constructors

Link copied to clipboard
fun <A, E> EmittingHandler(collectWithChannel: (Flow<A>, FlowCollector<E>, Job) -> Unit, flow: MutableSharedFlow<E> = MutableSharedFlow())

Functions

Link copied to clipboard
open suspend override fun collect(collector: FlowCollector<E>)

Properties

Link copied to clipboard
val collectWithChannel: (Flow<A>, FlowCollector<E>, Job) -> Unit
Link copied to clipboard
open override val process: (Flow<A>, Job) -> Unit

function defining how this Handler collects a Flow when connected using handledBy