EventDispatcher
class EventDispatcher(onRemoveSubscriptionEntry: (removedSubscriptions: Map<EventDispatcher.SubscriptionModule, List<String>>) -> Unit)
Implements a list of registered event callbacks.
Parameters
onRemoveSubscriptionEntry
callback triggered when all events from channel entry have been removed (it can also unsubscribe from the channel)
Constructors
Link copied to clipboard
constructor(onRemoveSubscriptionEntry: (removedSubscriptions: Map<EventDispatcher.SubscriptionModule, List<String>>) -> Unit)
Functions
Link copied to clipboard
suspend fun registerCallback(callbackRegistration: CallbackRegistration<out Any>): EventRegistrationInfo
Registers new event callback.
Link copied to clipboard
Removes all events, excluding internal library events, that do not have {@code subscriptionId}.