Class ResettableEventBus
java.lang.Object
com.google.web.bindery.event.shared.EventBus
com.google.web.bindery.event.shared.ResettableEventBus
Wraps an EventBus to hold on to any HandlerRegistrations, so that they can
easily all be cleared at once.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddHandler(Event.Type<H> type, H handler) Adds an unfiltered handler to receive events of this type from all sources.addHandlerToSource(Event.Type<H> type, Object source, H handler) Adds a handler to receive events of this type from the given source.voidFires the event from no source.voidfireEventFromSource(Event<?> event, Object source) Fires the given event to the handlers listening to the event's type.protected intVisible for testing.voidRemove all handlers that have been added through this wrapper.Methods inherited from class com.google.web.bindery.event.shared.EventBus
dispatchEvent, setSourceOfEvent
-
Constructor Details
-
Method Details
-
removeHandlers
public void removeHandlers()Remove all handlers that have been added through this wrapper. -
getRegistrationSize
protected int getRegistrationSize()Visible for testing.