EventReceiver
interface EventReceiver
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
abstract fun <T : Any> EventReceiver.subscribeTo(clazz: KClass<T>, callback: EventCallback<T>): EventReceiver
A variant of subscribeTo that uses an instance of EventCallback as callback.
abstract fun <T : Any> EventReceiver.subscribeTo(clazz: KClass<T>, priority: Priority = Priority.DEFAULT, ignoreCancelled: Boolean = false, skipRetained: Boolean = false, callback: suspend T.() -> Unit): EventReceiver
Link copied to clipboard
Unsubscribe from all events
Unsubscribe from events type of clazz
Properties
Inheritors
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