public class DefaultErrorResponseHandler extends Object implements HttpResponseHandler<AwsServiceException>
X_AMZN_REQUEST_ID_HEADER| Constructor and Description |
|---|
DefaultErrorResponseHandler(List<Unmarshaller<AwsServiceException,Node>> unmarshallerList)
Constructs a new DefaultErrorResponseHandler that will handle error responses from Amazon
services using the specified list of unmarshallers.
|
| Modifier and Type | Method and Description |
|---|---|
AwsServiceException |
handle(HttpResponse errorResponse,
ExecutionAttributes executionAttributes)
Accepts an HTTP response object, and returns an object of type T.
|
boolean |
needsConnectionLeftOpen()
Since this response handler completely consumes all the data from the underlying HTTP
connection during the handle method, we don't need to keep the HTTP connection open.
|
public DefaultErrorResponseHandler(List<Unmarshaller<AwsServiceException,Node>> unmarshallerList)
unmarshallerList - The list of unmarshallers to try using when handling an error
response.public AwsServiceException handle(HttpResponse errorResponse, ExecutionAttributes executionAttributes) throws Exception
HttpResponseHandlerhandle in interface HttpResponseHandler<AwsServiceException>errorResponse - The HTTP response to handle, as received from an AWS service.executionAttributes - The attributes attached to this particular execution.Exception - If any problems are encountered handling the response.public boolean needsConnectionLeftOpen()
needsConnectionLeftOpen in interface HttpResponseHandler<AwsServiceException>HttpResponseHandler.needsConnectionLeftOpen()Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.