/** * This method is used to indicate that the async callback is currently loading. It will not * do anything if the call is already finished (i.e. in the case of an immediate failure or * success). See {@link NotifyingAsyncCallback} for usage. */ public void checkLoading() { assert state != State.UNKNOWN; if (state == State.INITIALIZED) { counter++; if (counter == 1) { AsyncCallStartEvent.fire(eventBus); } state = State.LOADING; } }
@Override public Type<AsyncCallStartHandler> getAssociatedType() { return getType(); }
/** * Fires a {@link AsyncCallStartEvent} * into a source that has access to an {@link com.google.web.bindery.event.shared.EventBus}. * * @param source The source that fires this event ({@link EventBus}). */ public static void fire(EventBus source) { source.fireEvent(new AsyncCallStartEvent()); }