public class JsonErrorResponseHandler extends java.lang.Object implements HttpResponseHandler<AuthServiceException>
| Constructor and Description |
|---|
JsonErrorResponseHandler(java.util.List<Unmarshaller<AuthServiceException,JsonObject>> exceptionUnmarshallers) |
| Modifier and Type | Method and Description |
|---|---|
AuthServiceException |
handle(HttpResponse response)
Accepts an HTTP response object, and returns an object of type T.
|
boolean |
needsConnectionLeftOpen() |
protected AuthServiceException |
runErrorUnmarshallers(HttpResponse errorResponse,
JsonObject json) |
public JsonErrorResponseHandler(java.util.List<Unmarshaller<AuthServiceException,JsonObject>> exceptionUnmarshallers)
public AuthServiceException handle(HttpResponse response) throws java.lang.Exception
HttpResponseHandlerhandle in interface HttpResponseHandler<AuthServiceException>response - The HTTP response to handle, as received from request.java.lang.Exception - If any problems are encountered handling the response.protected AuthServiceException runErrorUnmarshallers(HttpResponse errorResponse, JsonObject json) throws java.lang.Exception
java.lang.Exceptionpublic boolean needsConnectionLeftOpen()
needsConnectionLeftOpen in interface HttpResponseHandler<AuthServiceException>true if this response handler requires that the
underlying HTTP connection be left open, and not automatically
closed, otherwise false.