com.google.gwt.gadgets.client.osapi
Class BatchRequest

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.gadgets.client.osapi.BatchRequest

public class BatchRequest
extends com.google.gwt.core.client.JavaScriptObject

A class implementing a request batching other requests.


Constructor Summary
protected BatchRequest()
          Required by JavaScriptObject policy.
 
Method Summary
<T extends com.google.gwt.core.client.JavaScriptObject>
void
add(OsapiRequest<T> request, Callback<T> callback)
          Adds an opensocial request to this batch request.
 void execute()
          Executes this batch request.
static BatchRequest newInstance()
          Returns the new instance of BatchRequest class.
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BatchRequest

protected BatchRequest()
Required by JavaScriptObject policy.

Method Detail

newInstance

public static final BatchRequest newInstance()
Returns the new instance of BatchRequest class.

Returns:
The new instance of BatchRequest class.

add

public final <T extends com.google.gwt.core.client.JavaScriptObject> void add(OsapiRequest<T> request,
                                                                              Callback<T> callback)
Adds an opensocial request to this batch request.

Parameters:
request - OpenSocial request to batch.
callback - Callback to be called when request finishes.

execute

public final void execute()
Executes this batch request. After invoking this method add(com.google.gwt.gadgets.client.osapi.OsapiRequest, com.google.gwt.gadgets.client.osapi.Callback) methods should not be called on this object.