Package 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 Callbackinvalid input: '<'T, Throwable> callback) { GWT.runAsync(new RunAsyncCallback() { public void onSuccess() { callback.onSuccess(javax.inject.Provider.get()); } public void onFailure(Throwable ex) { callback.onFailure(ex); } } }
-
Method Summary
-
Method Details
-
get
- Parameters:
callback
- Callback used to pass the instance of T or an exception if there is an issue creating that instance.
-