EventReceiverImpl
Class for receiving events posted to FlowBus
Parameters
bus
FlowBus instance to subscribe to. If not set, the koin singleton will be used.
Constructors
Functions
Link copied to clipboard
Link copied to clipboard
Checks if this implementation of EventReceiver determines that an event is cancelled.
Link copied to clipboard
Set the CoroutineDispatcher
which will be used to launch your callbacks.
Link copied to clipboard
open override fun <T : Any> EventReceiver.subscribeTo(clazz: KClass<T>, callback: EventCallback<T>): EventReceiver
A variant of subscribeTo that uses an instance of EventCallback as callback.
open override fun <T : Any> EventReceiver.subscribeTo(clazz: KClass<T>, priority: Priority, ignoreCancelled: Boolean, skipRetained: Boolean, callback: suspend T.() -> Unit): EventReceiver
Link copied to clipboard
Unsubscribe from all events
Unsubscribe from events type of clazz
Properties
Extensions
Link copied to clipboard
inline fun <T : Any> EventReceiver.subscribe(priority: Priority = Priority.DEFAULT, ignoreCancelled: Boolean = false, skipRetained: Boolean = false, noinline callback: suspend T.() -> Unit): EventReceiver
Simplified EventReceiver.subscribeTo for Kotlin. Type of event is automatically inferred from callback parameter type.
A variant of subscribe that uses an instance of EventCallback as callback.
Link copied to clipboard
inline fun <T : Any> EventReceiver.subscribeFlow(priority: Priority = Priority.DEFAULT, ignoreCancelled: Boolean = false, skipRetained: Boolean = false): Flow<T>
Link copied to clipboard