GenericEventProvider

@HomeExperimentalGenericApi
class GenericEventProvider : HasEvents


Summary

Public constructors

Public functions

open Flow<Event>

Gets a flow of all Events available for the object.

open Flow<T>
<T : Event> events(event: EventFactory<T>)

Gets a flow of a specific Event.

open Flow<Event>
<T : Trait> events(trait: TraitFactory<T>)

Gets a flow of all Events by this Trait.

Public constructors

GenericEventProvider

GenericEventProvider()

Public functions

events

open fun events(): Flow<Event>

Gets a flow of all Events available for the object.

Returns
Flow<Event>

The flow for all Events on this object.

events

open fun <T : Event> events(event: EventFactory<T>): Flow<T>

Gets a flow of a specific Event.

Parameters
event: EventFactory<T>

the Event to subscribe to.

Returns
Flow<T>

the flow for the Event.

events

open fun <T : Trait> events(trait: TraitFactory<T>): Flow<Event>

Gets a flow of all Events by this Trait.

Parameters
trait: TraitFactory<T>

the Trait for which to subscribe to Events.

Returns
Flow<Event>

the flow for Trait Events.