public class AsyncHttpResponseHandler extends Object
限定符和类型 | 字段和说明 |
---|---|
protected static int |
FAILURE_MESSAGE |
protected static int |
FINISH_MESSAGE |
protected static int |
START_MESSAGE |
protected static int |
SUCCESS_MESSAGE |
构造器和说明 |
---|
AsyncHttpResponseHandler() |
AsyncHttpResponseHandler(Context context) |
限定符和类型 | 方法和说明 |
---|---|
protected void |
handleFailureMessage(Throwable e,
String responseBody) |
protected void |
handleMessage(Message msg) |
protected void |
handleSuccessMessage(int statusCode,
String responseBody) |
protected Message |
obtainMessage(int responseMessage,
Object response) |
void |
onFailure(Throwable error) |
void |
onFailure(Throwable error,
String content) |
void |
onFinish() |
void |
onStart() |
void |
onSuccess(int statusCode,
String content) |
void |
onSuccess(String content) |
protected void |
sendFailureMessage(Throwable e,
byte[] responseBody) |
protected void |
sendFailureMessage(Throwable e,
String responseBody) |
protected void |
sendFinishMessage() |
protected void |
sendMessage(Message msg) |
protected void |
sendStartMessage() |
protected void |
sendSuccessMessage(int statusCode,
String responseBody) |
protected static final int SUCCESS_MESSAGE
protected static final int FAILURE_MESSAGE
protected static final int START_MESSAGE
protected static final int FINISH_MESSAGE
public AsyncHttpResponseHandler()
public AsyncHttpResponseHandler(Context context)
public void onStart()
public void onFinish()
public void onSuccess(String content)
public void onSuccess(int statusCode, String content)
public void onFailure(Throwable error)
protected void sendSuccessMessage(int statusCode, String responseBody)
protected void sendFailureMessage(Throwable e, byte[] responseBody)
protected void sendStartMessage()
protected void sendFinishMessage()
protected void handleSuccessMessage(int statusCode, String responseBody)
protected void handleMessage(Message msg)
protected void sendMessage(Message msg)
protected Message obtainMessage(int responseMessage, Object response)