T - The type of the expected response value.public interface OnResponseCallback<T>
HttpRequestExecutor#execute(java.net.URI, IHttpRequest, IResponseCallback) or
HttpRequestExecutor#execute(java.net.URI, IHttpRequest, IResponseCallback, IRedirectionCallback) when the response has been handled or an error
occurred.
Note that exactly one of #onResponse(Object) and #onError(Exception) gets called per request, never both.
Also note that this may be called in a background thread, depending on the actual implementation of the HttpRequestExecutor.
| Modifier and Type | Method and Description |
|---|---|
void |
onError(java.net.URI requestUri,
java.lang.Exception e)
Called if any error occurred during the execution of the request.
|
void |
onResponse(java.net.URI requestUri,
java.net.URI respondingUri,
T response)
Called when the response object has been parsed and handled successfully.
|
void onResponse(java.net.URI requestUri,
java.net.URI respondingUri,
T response)
HttpResponseHandler#handleResponse(IHttpResponse).requestUri - The URI the request was sent to.respondingUri - The URI that the actual response was returned from.response - The response object as returned by HttpResponseHandler#handleResponse(IHttpResponse).void onError(java.net.URI requestUri,
java.lang.Exception e)
requestUri - The URI the request was sent to.e - The Exception that was thrown.