com.google.gwt.core.client
Interface AsyncProvider<T,F>
- Type Parameters:
T
- the type of the provided valueF
- the type returned on failure
public interface AsyncProvider<T,F>
An object capable of providing an instance of type T asynchronously
via Callback
. For example, the instance might be
created within a GWT.runAsync block using the following template:
public void get(final Callback callback) {
GWT.runAsync(new RunAsyncCallback() {
public void onSuccess() {
callback.onSuccess(javax.inject.Provider.get());
}
public void onFailure(Throwable ex) {
callback.onFailure(ex);
}
}
}
get
void get(Callback<? super T,? super F> callback)
- Parameters:
callback
- Callback used to pass the instance of T or an exception
if there is an issue creating that instance.