public class RouteResponseHandler extends Object
限定符和类型 | 字段和说明 |
---|---|
protected static int |
FAILURE_MESSAGE |
protected static int |
START_MESSAGE |
protected static int |
SUCCESS_MESSAGE |
构造器和说明 |
---|
RouteResponseHandler() |
限定符和类型 | 方法和说明 |
---|---|
protected void |
handleFailureMessage(Throwable e,
String responseBody) |
protected void |
handleMessage(Message msg) |
protected void |
handleStartMessage() |
protected void |
handleSuccessMessage(int statusCode,
String responseBody) |
protected Message |
obtainMessage(int responseMessage,
Object response) |
void |
onFailure(Throwable error,
String content)
请求失败
|
void |
onStart()
开始请求
|
void |
onSuccess(int statusCode,
String content)
请求成功
|
protected void |
sendFailureMessage(IOException e,
String responseBody) |
protected void |
sendMessage(Message msg) |
protected boolean |
sendResponseMessage(Response response) |
protected void |
sendStartMessage() |
protected void |
sendSuccessMessage(int statusCode,
String responseBody) |
protected static final int START_MESSAGE
protected static final int SUCCESS_MESSAGE
protected static final int FAILURE_MESSAGE
public void onStart()
public void onSuccess(int statusCode, String content)
statusCode
- content
- protected void sendStartMessage()
protected void sendSuccessMessage(int statusCode, String responseBody)
protected void sendFailureMessage(IOException e, String responseBody)
protected boolean sendResponseMessage(Response response)
protected void handleMessage(Message msg)
protected void handleStartMessage()
protected void handleSuccessMessage(int statusCode, String responseBody)
protected void sendMessage(Message msg)
protected Message obtainMessage(int responseMessage, Object response)