RequestBatch
最新バージョンのSDKではこのクラスは使用できません。
このクラスには新しいバージョンがあります。ご確認ください。 最新バージョン

RequestBatch contains a list of Request objects that can be sent to Facebook in a single round-trip.

拡張:AbstractList
パッケージ:facebook
コンストラクター
RequestBatch()

Constructor. Creates an empty batch.

public RequestBatch()
RequestBatch(Collection)

Constructor.

public RequestBatch(Collection requests)
パラメーター説明
requestsThe requests to add to the batch
RequestBatch(Request)

Constructor.

public RequestBatch(Request requests)
パラメーター説明
requestsThe requests to add to the batch
RequestBatch(RequestBatch)

Constructor.

public RequestBatch(RequestBatch requests)
パラメーター説明
requestsThe 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()
Returns
The timeout, in milliseconds; 0 (the default) means do not timeout
setTimeout(int)

Sets the timeout to wait for responses from the server before a timeout error occurs.

public void setTimeout(int timeoutInMilliseconds)
パラメーター説明
timeoutInMillisecondsThe 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)
パラメーター説明
callbackThe callback
removeCallback(Callback)

Removes a batch-level callback.

public void removeCallback(Callback callback)
パラメーター説明
callbackThe 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()
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()
Returns
A list of Response objects representing the results of the requests; responses are returned in the same order as the requests were specified.
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 Request.setCallback(com.facebook.Request.Callback))

This should only be called from the UI thread.

public final RequestAsyncTask executeAsync()
Returns
A RequestAsyncTask that is executing the request