public class HandlerManager extends Object implements org.gwtproject.event.shared.HasHandlers
EventBus.| Constructor and Description |
|---|
HandlerManager(Object source)
Creates a handler manager with a source to be set on all events fired via
fireEvent(Event). |
HandlerManager(Object source,
boolean fireInReverseOrder)
Creates a handler manager with the given source, specifying the order in which handlers are
fired.
|
| Modifier and Type | Method and Description |
|---|---|
<H> org.gwtproject.event.shared.HandlerRegistration |
addHandler(org.gwtproject.event.shared.Event.Type<H> type,
H handler)
Adds a handler.
|
void |
fireEvent(org.gwtproject.event.shared.Event<?> event)
Fires the given event to the handlers listening to the event's type.
|
int |
getHandlerCount(org.gwtproject.event.shared.Event.Type<?> type)
Deprecated.
|
boolean |
isEventHandled(org.gwtproject.event.shared.Event.Type<?> e)
Deprecated.
|
public HandlerManager(Object source)
fireEvent(Event). Handlers will be fired in the order that they are added.source - the default event sourcepublic HandlerManager(Object source, boolean fireInReverseOrder)
source - the event sourcefireInReverseOrder - true to fire handlers in reverse orderpublic <H> org.gwtproject.event.shared.HandlerRegistration addHandler(org.gwtproject.event.shared.Event.Type<H> type,
H handler)
H - The type of handlertype - the event type associated with this handlerhandler - the handlerpublic void fireEvent(org.gwtproject.event.shared.Event<?> event)
Any exceptions thrown by handlers will be bundled into a UmbrellaException and then
re-thrown after all handlers have completed. An exception thrown by a handler will not prevent
other handlers from executing.
Note, any subclass should be very careful about overriding this method, as adds/removes of handlers will not be safe except within this implementation.
fireEvent in interface org.gwtproject.event.shared.HasHandlersevent - the event@Deprecated public int getHandlerCount(org.gwtproject.event.shared.Event.Type<?> type)
type - the event type@Deprecated public boolean isEventHandled(org.gwtproject.event.shared.Event.Type<?> e)
e - the event typeCopyright © 2020 Treblereel. All rights reserved.