com.google.gwt.ajaxloader.client
Class AjaxLoader

java.lang.Object
  extended by com.google.gwt.ajaxloader.client.AjaxLoader

public class AjaxLoader
extends java.lang.Object

A wrapper for the google Ajax API loader. http://code.google.com/apis/ajax/documentation/


Nested Class Summary
static class AjaxLoader.AjaxLoaderOptions
          An object to pass as the third parameter to load() call.
 
Method Summary
static ClientLocation getClientLocation()
           
static void init()
          Initialize the API without specifying a key.
static void init(java.lang.String apiKey)
          Initialize the API with a supplied key value.
static void init(java.lang.String apiKey, java.lang.String hostname)
          Initialize the API with a supplied key value and custom hostname.
static void loadApi(java.lang.String api, java.lang.String version, java.lang.Runnable onLoad, AjaxLoader.AjaxLoaderOptions settings)
          Launches an API load request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getClientLocation

public static ClientLocation getClientLocation()

init

public static void init()
Initialize the API without specifying a key.


init

public static void init(java.lang.String apiKey)
Initialize the API with a supplied key value. See http://code.google.com/apis/ajaxsearch/signup.html

Parameters:
apiKey - API key value.

init

public static void init(java.lang.String apiKey,
                        java.lang.String hostname)
Initialize the API with a supplied key value and custom hostname. Most programmers should use init(String) instead, as it covers almost all cases of using AjaxLoader API. See http://code.google.com/apis/ajaxsearch/signup.html

Parameters:
apiKey - API key value.
hostname - Custom hostname (e.g. "www.google.com").

loadApi

public static void loadApi(java.lang.String api,
                           java.lang.String version,
                           java.lang.Runnable onLoad,
                           AjaxLoader.AjaxLoaderOptions settings)
Launches an API load request.

Parameters:
api - The name of the API to load
version - The API version to load
onLoad - A callback that will be invoked when the API is finished loaded. Do not make any calls into the API being loaded until this call returns.
settings - An object containing additional settings.