com.google.gwt.inject.client
Interface AsyncProvider<T>


public interface AsyncProvider<T>

An object capable of providing an instance of type T asynchronously via AsyncCallback. The instance is created within a GWT.runAsync block using the following template:

      public void get(final AsyncCallback callback) {
        GWT.runAsync(new RunAsyncCallback() {
          public void onSuccess() {
            callback.onSuccess(Provider.get());
          }
          public void onFailure(Throwable ex) {
            callback.onFailure(ex);
          }
        }
      }
  


Method Summary
 void get(com.google.gwt.user.client.rpc.AsyncCallback<? super T> callback)
           
 

Method Detail

get

void get(com.google.gwt.user.client.rpc.AsyncCallback<? super T> callback)
Parameters:
callback - Callback used to pass the instance of T or an exception if there is an issue creating that instance.