public class HttpRequestTask extends android.os.AsyncTask<java.lang.Void,java.lang.Void,HttpResponse>
| Constructor and Description |
|---|
HttpRequestTask(HttpRequest httpRequest,
HttpRequest.Handler handler)
start an async task for handling the http request and given a response handler
|
HttpRequestTask(HttpRequest httpRequest,
HttpRequest.Handler handler,
android.app.Activity activity)
start an async task for handling the http request, a response handler and the activity that is sending this request,
and it will check if the activity is not finished before calling the response handler
|
| Modifier and Type | Method and Description |
|---|---|
protected HttpResponse |
doInBackground(java.lang.Void... params) |
protected void |
onCancelled() |
protected void |
onPostExecute(HttpResponse response) |
public HttpRequestTask(HttpRequest httpRequest, HttpRequest.Handler handler)
httpRequest - handler - public HttpRequestTask(HttpRequest httpRequest, HttpRequest.Handler handler, android.app.Activity activity)
httpRequest - handler - activity - protected HttpResponse doInBackground(java.lang.Void... params)
doInBackground in class android.os.AsyncTask<java.lang.Void,java.lang.Void,HttpResponse>protected void onPostExecute(HttpResponse response)
onPostExecute in class android.os.AsyncTask<java.lang.Void,java.lang.Void,HttpResponse>protected void onCancelled()
onCancelled in class android.os.AsyncTask<java.lang.Void,java.lang.Void,HttpResponse>