public class S3ErrorResponseHandler extends java.lang.Object implements HttpResponseHandler<AmazonServiceException>
Modifier and Type | Class and Description |
---|---|
private static class |
S3ErrorResponseHandler.S3ErrorTags |
Modifier and Type | Field and Description |
---|---|
private static org.apache.commons.logging.Log |
log
Shared logger for profiling information
|
private static javax.xml.stream.XMLInputFactory |
xmlInputFactory
Shared factory for creating XML event readers
|
X_AMZN_REQUEST_ID_HEADER
Constructor and Description |
---|
S3ErrorResponseHandler() |
Modifier and Type | Method and Description |
---|---|
private AmazonS3Exception |
createExceptionFromHeaders(HttpResponse errorResponse,
java.lang.String errorResponseXml) |
AmazonServiceException |
handle(HttpResponse httpResponse)
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.
|
private static final org.apache.commons.logging.Log log
private static final javax.xml.stream.XMLInputFactory xmlInputFactory
public AmazonServiceException handle(HttpResponse httpResponse) throws javax.xml.stream.XMLStreamException
HttpResponseHandler
handle
in interface HttpResponseHandler<AmazonServiceException>
httpResponse
- The HTTP response to handle, as received from an AWS service.javax.xml.stream.XMLStreamException
private AmazonS3Exception createExceptionFromHeaders(HttpResponse errorResponse, java.lang.String errorResponseXml)
public boolean needsConnectionLeftOpen()
needsConnectionLeftOpen
in interface HttpResponseHandler<AmazonServiceException>
HttpResponseHandler.needsConnectionLeftOpen()