public class BlackholeHttpResponseHandler extends AsyncHttpResponseHandler
Use this implementation, if you deliberately want to ignore all response, because you cannot pass null ResponseHandlerInterface into AsyncHttpClient implementation
BUFFER_SIZE, CANCEL_MESSAGE, DEFAULT_CHARSET, FAILURE_MESSAGE, FINISH_MESSAGE, PROGRESS_MESSAGE, RETRY_MESSAGE, START_MESSAGE, SUCCESS_MESSAGE, UTF8_BOM| Constructor and Description |
|---|
BlackholeHttpResponseHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
onCancel() |
void |
onFailure(int statusCode,
cz.msebera.android.httpclient.Header[] headers,
byte[] responseBody,
java.lang.Throwable error)
Fired when a request fails to complete, override to handle in your own code
|
void |
onFinish()
Fired in all cases when the request is finished, after both success and failure, override to
handle in your own code
|
void |
onPostProcessResponse(ResponseHandlerInterface instance,
cz.msebera.android.httpclient.HttpResponse response)
This method is called once by the system when the request has been fully
sent, handled and finished.
|
void |
onPreProcessResponse(ResponseHandlerInterface instance,
cz.msebera.android.httpclient.HttpResponse response)
This method is called once by the system when the response is about to be
processed by the system.
|
void |
onProgress(long bytesWritten,
long totalSize)
Fired when the request progress, override to handle in your own code
|
void |
onRetry(int retryNo)
Fired when a retry occurs, override to handle in your own code
|
void |
onStart()
Fired when the request is started, override to handle in your own code
|
void |
onSuccess(int statusCode,
cz.msebera.android.httpclient.Header[] headers,
byte[] responseBody)
Fired when a request returns successfully, override to handle in your own code
|
void |
onUserException(java.lang.Throwable error) |
getCharset, getRequestHeaders, getRequestURI, getTag, getUsePoolThread, getUseSynchronousMode, handleMessage, obtainMessage, postRunnable, sendCancelMessage, sendFailureMessage, sendFinishMessage, sendMessage, sendProgressMessage, sendResponseMessage, sendRetryMessage, sendStartMessage, sendSuccessMessage, setCharset, setRequestHeaders, setRequestURI, setTag, setUsePoolThread, setUseSynchronousModepublic void onSuccess(int statusCode,
cz.msebera.android.httpclient.Header[] headers,
byte[] responseBody)
AsyncHttpResponseHandleronSuccess in class AsyncHttpResponseHandlerstatusCode - the status code of the responseheaders - return headers, if anyresponseBody - the body of the HTTP response from the serverpublic void onFailure(int statusCode,
cz.msebera.android.httpclient.Header[] headers,
byte[] responseBody,
java.lang.Throwable error)
AsyncHttpResponseHandleronFailure in class AsyncHttpResponseHandlerstatusCode - return HTTP status codeheaders - return headers, if anyresponseBody - the response body, if anyerror - the underlying cause of the failurepublic void onProgress(long bytesWritten,
long totalSize)
AsyncHttpResponseHandleronProgress in class AsyncHttpResponseHandlerbytesWritten - offset from start of filetotalSize - total size of filepublic void onCancel()
onCancel in class AsyncHttpResponseHandlerpublic void onFinish()
AsyncHttpResponseHandleronFinish in class AsyncHttpResponseHandlerpublic void onPostProcessResponse(ResponseHandlerInterface instance, cz.msebera.android.httpclient.HttpResponse response)
ResponseHandlerInterfacePlease note: post-processing does NOT run on the main thread, and thus any UI activities that you must perform should be properly dispatched to the app's UI thread.
onPostProcessResponse in interface ResponseHandlerInterfaceonPostProcessResponse in class AsyncHttpResponseHandlerinstance - An instance of this response objectresponse - The response to post-processpublic void onPreProcessResponse(ResponseHandlerInterface instance, cz.msebera.android.httpclient.HttpResponse response)
ResponseHandlerInterfacePlease note: pre-processing does NOT run on the main thread, and thus any UI activities that you must perform should be properly dispatched to the app's UI thread.
onPreProcessResponse in interface ResponseHandlerInterfaceonPreProcessResponse in class AsyncHttpResponseHandlerinstance - An instance of this response objectresponse - The response to pre-processedpublic void onRetry(int retryNo)
AsyncHttpResponseHandleronRetry in class AsyncHttpResponseHandlerretryNo - number of retrypublic void onStart()
AsyncHttpResponseHandleronStart in class AsyncHttpResponseHandlerpublic void onUserException(java.lang.Throwable error)
onUserException in class AsyncHttpResponseHandler