Accela SDK for Android
V3.0
|
Public Member Functions | |
abstract void | onSuccess (JSONObject response) |
abstract void | onFailure (Throwable error) |
void | onSuccess (JSONArray response) |
Public Member Functions inherited from com.accela.mobile.http.AsyncHttpResponseHandler | |
AsyncHttpResponseHandler () | |
abstract void | onStart () |
void | onFinish () |
void | onSuccess (String content) |
void | onSuccess (byte[] content) |
void | onFailure (Throwable error) |
void | onTimeout () |
Public Attributes | |
JSONObject | rawResponseJson |
Public Attributes inherited from com.accela.mobile.http.AsyncHttpResponseHandler | |
HttpResponse | httpResponse |
Header[] | responseHeaders |
String | rawResponseBody |
Protected Member Functions | |
void | handleSuccessMessage (String responseBody) |
JSONObject | parseResponse (String responseBody) throws JSONException |
Protected Member Functions inherited from com.accela.mobile.http.AsyncHttpResponseHandler | |
void | sendTimeoutMessage () |
void | sendSuccessMessage (byte[] responseBody) |
void | sendFailureMessage (Throwable e) |
void | sendStartMessage () |
void | sendFinishMessage () |
void | handleSuccessMessage (byte[] responseBody) |
void | handleSuccessMessage (String responseBody) |
void | handleFailureMessage (Throwable e) |
void | handleMessage (Message msg) |
void | sendMessage (Message msg) |
Message | obtainMessage (int responseMessage, Object response) |
void | sendResponseMessage (HttpResponse response) |
Additional Inherited Members | |
Protected Attributes inherited from com.accela.mobile.http.AsyncHttpResponseHandler | |
int | responseStatusCode |
Accela Amobile File: JsonHttpResponseHandler.java
Accela, Inc. Copyright (C): 2012
Description: Json response callback handler object, called during an asynchronous request is being processed.
Notes: Used to intercept and handle the responses from requests made using AsyncHttpClient, with automatic parsing into a JSONObject or JSONArray.
This class is designed to be passed to get, post, put and delete requests with the onSuccess(JSONObject) or onSuccess(JSONArray) methods anonymously overridden.
Additionally, you can override the other event methods from the parent class.
Revision History@since 1.0
|
inlineprotected |
Override the handleSuccessMessage method inherited from its parent class.
|
pure virtual |
Fired when a request fails to complete, *override to handle in your own code.
error | The underlying cause of the failure. |
@since 1.0
|
pure virtual |
Fired when a request returns successfully and contains a json object *at the base of the response string. Override to handle in your own code.
response | The parsed json object found in the server response (if any). |
@since 1.0
|
inline |
Fired when a request returns successfully and contains a json array *at the base of the response string. Override to handle in your own code.
response | The parsed json array found in the server response (if any). |
@since 1.0
|
inlineprotected |
Protected method, used to convert response string to JSON object.