EventDispatcher
Implements a list of registered event callbacks.
Constructors
EventDispatcher
Creates instance of EventDispatcher.
Params
onRemoveSubscriptionEntry
EventCallback<Map<List<String>>>
callback triggered when all events from channel entry have been removed (it can also unsubscribe from the channel)
Methods
emit
Emits specified event. It should only be called by event loops.
Params
event
Event<T>
event data to emit
registerCallback
Registers new event callback.
Params
callbackRegistration
CallbackRegistration<?>
object describing single callback registration
Returns
EventRegistrationInfo ·
this callback registration info
removeNotSubscribedEvents
Removes all events, excluding internal library events, that do not have subscriptionId.
unbind
Removes all callbacks registered by #registerCallback(CallbackRegistration). It's identified by given callbackGroups.
Params
callbackGroups
Object[]
one or more callback group identifiers used to select callbacks to unbind
unbindAll
Removes all callbacks.
We use cookies on our website. We use them to ensure proper functioning of the site and, if you agree, for purposes such as analytics, marketing, and targeting ads.