public CountingEventBus() { this(new SimpleEventBus()); }
public void removeHandler() { doRemove(type, source, handler); } };
@Override public void fireEvent(Event<?> event) { real.fireEvent(event); }
/** * @deprecated required by legacy features in GWT's old HandlerManager */ @Deprecated protected <H> H getHandler(Event.Type<H> type, int index) { assert index < getHandlerCount(type) : "handlers for " + type.getClass() + " have size: " + getHandlerCount(type) + " so do not have a handler at index: " + index; List<H> l = getHandlerList(type, null); return l.get(index); }
setSourceOfEvent(event, source); List<H> handlers = getDispatchList(event.getAssociatedType(), source); Set<Throwable> causes = null; dispatchEvent(event, handler); } catch (Throwable e) { if (causes == null) { firingDepth--; if (firingDepth == 0) { handleQueuedAddsAndRemoves();
@Override protected int getHandlerCount(Event.Type<?> eventKey) { return super.getHandlerCount(eventKey); }
@Override public <H> HandlerRegistration addHandler(Type<H> type, H handler) { return real.addHandler(type, handler); }
private <H> void enqueueRemove(final Event.Type<H> type, final Object source, final H handler) { defer(new Command() { public void execute() { doRemoveNow(type, source, handler); } }); }
@Override public <H> HandlerRegistration addHandler(Type<H> type, H handler) { return doAdd(type, null, handler); }
@Override protected boolean isEventHandled(Event.Type<?> eventKey) { return super.isEventHandled(eventKey); } }
@Override protected <H> H getHandler(Event.Type<H> type, int index) { return super.getHandler(type, index); }
setSourceOfEvent(event, source); List<H> handlers = getDispatchList(event.getAssociatedType(), source); Set<Throwable> causes = null; dispatchEvent(event, handler); } catch (Throwable e) { if (causes == null) { firingDepth--; if (firingDepth == 0) { handleQueuedAddsAndRemoves();
/** * @deprecated required by legacy features in GWT's old HandlerManager */ @Deprecated protected <H> H getHandler(Event.Type<H> type, int index) { assert index < getHandlerCount(type) : "handlers for " + type.getClass() + " have size: " + getHandlerCount(type) + " so do not have a handler at index: " + index; List<H> l = getHandlerList(type, null); return l.get(index); }
@Override protected int getHandlerCount(Event.Type<?> eventKey) { return super.getHandlerCount(eventKey); }
@Override public <H> HandlerRegistration addHandler(Type<H> type, H handler) { return real.addHandler(type, handler); }
private <H> void enqueueAdd(final Event.Type<H> type, final Object source, final H handler) { defer(new Command() { public void execute() { doAddNow(type, source, handler); } }); }
@Override public <H> HandlerRegistration addHandlerToSource(final Event.Type<H> type, final Object source, final H handler) { if (source == null) { throw new NullPointerException("Cannot add a handler with a null source"); } return doAdd(type, source, handler); }
@Override protected boolean isEventHandled(Event.Type<?> eventKey) { return super.isEventHandled(eventKey); } }
@Override protected <H> H getHandler(Event.Type<H> type, int index) { return super.getHandler(type, index); }
public RecordingEventBus() { this(new SimpleEventBus()); }