public interface ResponseListener
RestClient.
Those methods that do accept a listener will return immediately, execute asynchronously, and notify
the listener whenever the request yielded a response, or failed with an exception.
Note that it is not safe to call RestClient.close() from either of these
callbacks.
| Modifier and Type | Method | Description |
|---|---|---|
void |
onFailure(java.lang.Exception exception) |
Method invoked if the request failed.
|
void |
onSuccess(Response response) |
Method invoked if the request yielded a successful response
|
void onSuccess(Response response)
void onFailure(java.lang.Exception exception)
IOExceptions, or responses that were treated as errors based on their error response code
(ResponseExceptions).