Android SDK Version
  • java.lang.Object
    • <any>
      • com.facebook.GraphRequestAsyncTask

public class GraphRequestAsyncTask
extends <any>
Defines an AsyncTask suitable for executing a Request in the background. May be subclassed by applications having unique threading model needs.
Constructor Summary
Constructor and Description
GraphRequestAsyncTask(java.util.Collection<GraphRequest> requests)
Constructor.
GraphRequestAsyncTask(GraphRequest... requests)
Constructor.
GraphRequestAsyncTask(GraphRequestBatch requests)
Constructor.
GraphRequestAsyncTask(java.net.HttpURLConnection connection, java.util.Collection<GraphRequest> requests)
Constructor that allows specification of an HTTP connection to use for executing the requests.
GraphRequestAsyncTask(java.net.HttpURLConnection connection, GraphRequest... requests)
Constructor that allows specification of an HTTP connection to use for executing the requests.
GraphRequestAsyncTask(java.net.HttpURLConnection connection, GraphRequestBatch requests)
Constructor that allows specification of an HTTP connection to use for executing the requests.
Method Summary
Modifier and TypeMethod and Description
protected java.util.List<GraphResponse>doInBackground(java.lang.Void... params) 
protected java.lang.ExceptiongetException() 
protected GraphRequestBatchgetRequests() 
protected voidonPostExecute(java.util.List<GraphResponse> result) 
protected voidonPreExecute() 
java.lang.StringtoString() 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail

GraphRequestAsyncTask

public GraphRequestAsyncTask(GraphRequest... requests)
Constructor. Serialization of the requests will be done in the background, so any serialization- related errors will be returned via the Response.getException() method.
Parameters:
requests - the requests to execute

GraphRequestAsyncTask

public GraphRequestAsyncTask(java.util.Collection<GraphRequest> requests)
Constructor. Serialization of the requests will be done in the background, so any serialization- related errors will be returned via the Response.getException() method.
Parameters:
requests - the requests to execute

GraphRequestAsyncTask

public GraphRequestAsyncTask(GraphRequestBatch requests)
Constructor. Serialization of the requests will be done in the background, so any serialization- related errors will be returned via the Response.getException() method.
Parameters:
requests - the requests to execute

GraphRequestAsyncTask

public GraphRequestAsyncTask(java.net.HttpURLConnection connection,
                             GraphRequest... requests)
Constructor that allows specification of an HTTP connection to use for executing the requests. No validation is done that the contents of the connection actually reflect the serialized requests, so it is the caller's responsibility to ensure that it will correctly generate the desired responses.
Parameters:
connection - the HTTP connection to use to execute the requests
requests - the requests to execute

GraphRequestAsyncTask

public GraphRequestAsyncTask(java.net.HttpURLConnection connection,
                             java.util.Collection<GraphRequest> requests)
Constructor that allows specification of an HTTP connection to use for executing the requests. No validation is done that the contents of the connection actually reflect the serialized requests, so it is the caller's responsibility to ensure that it will correctly generate the desired responses.
Parameters:
connection - the HTTP connection to use to execute the requests
requests - the requests to execute

GraphRequestAsyncTask

public GraphRequestAsyncTask(java.net.HttpURLConnection connection,
                             GraphRequestBatch requests)
Constructor that allows specification of an HTTP connection to use for executing the requests. No validation is done that the contents of the connection actually reflect the serialized requests, so it is the caller's responsibility to ensure that it will correctly generate the desired responses.
Parameters:
connection - the HTTP connection to use to execute the requests
requests - the requests to execute
Method Detail

getException

protected final java.lang.Exception getException()

getRequests

protected final GraphRequestBatch getRequests()

toString

public java.lang.String toString()

onPreExecute

protected void onPreExecute()

onPostExecute

protected void onPostExecute(java.util.List<GraphResponse> result)

doInBackground

protected java.util.List<GraphResponse> doInBackground(java.lang.Void... params)