RequestBatch contains a list of Request objects that can be sent to Facebook in a single round-trip.
확장: | AbstractList |
패키지: | facebook |
GraphRequestBatch()
Constructor. Creates an empty batch.
public GraphRequestBatch()
GraphRequestBatch(Collection)
Constructor.
public GraphRequestBatch(Collection requests)
매개변수 | 설명 |
---|---|
requests | The requests to add to the batch |
GraphRequestBatch(GraphRequest)
Constructor.
public GraphRequestBatch(GraphRequest requests)
매개변수 | 설명 |
---|---|
requests | The requests to add to the batch |
GraphRequestBatch(GraphRequestBatch)
Constructor.
public GraphRequestBatch(GraphRequestBatch requests)
매개변수 | 설명 |
---|---|
requests | The requests to add to the batch |
getTimeout()
Gets the timeout to wait for responses from the server before a timeout error occurs.
public int getTimeout()
setTimeout(int)
Sets the timeout to wait for responses from the server before a timeout error occurs.
public void setTimeout(int timeoutInMilliseconds)
매개변수 | 설명 |
---|---|
timeoutInMilliseconds | The timeout, in milliseconds; 0 means do not timeout |
addCallback(Callback)
Adds a batch-level callback which will be called when the entire batch has finished executing.
public void addCallback(Callback callback)
매개변수 | 설명 |
---|---|
callback | The callback |
removeCallback(Callback)
Removes a batch-level callback.
public void removeCallback(Callback callback)
매개변수 | 설명 |
---|---|
callback | The callback |
add(Object)
public boolean add(Object arg0)
매개변수 | 설명 |
---|---|
arg0 |
add(int, Object)
public void add(int arg0, Object arg1)
매개변수 | 설명 |
---|---|
arg0 | |
arg1 |
clear()
public void clear()
get(int)
public Object get(int arg0)
매개변수 | 설명 |
---|---|
arg0 |
remove(int)
public Object remove(int arg0)
매개변수 | 설명 |
---|---|
arg0 |
set(int, Object)
public Object set(int arg0, Object arg1)
매개변수 | 설명 |
---|---|
arg0 | |
arg1 |
size()
public int size()
getBatchApplicationId()
Getter for the batch application id.
public final String getBatchApplicationId()
setBatchApplicationId(String)
Setter for the batch application id.
public final void setBatchApplicationId(String batchApplicationId)
매개변수 | 설명 |
---|---|
batchApplicationId | The batch application id. |
executeAndWait()
Executes this batch on the current thread and returns the responses.
This should only be used if you have transitioned off the UI thread.
public final List executeAndWait()
executeAsync()
Executes this batch asynchronously. This function will return immediately, and the batch will be processed on a separate thread. In order to process results of a request, or determine whether a request succeeded or failed, a callback must be specified (see GraphRequest.setCallback(GraphRequest.Callback))
This should only be called from the UI thread.
public final GraphRequestAsyncTask executeAsync()