T
- The output type resulting from handling a response.public abstract class AbstractS3ResponseHandler<T> extends java.lang.Object implements HttpResponseHandler<AmazonWebServiceResponse<T>>
Modifier and Type | Field and Description |
---|---|
private static java.util.Set<java.lang.String> |
ignoredHeaders
The set of response headers that aren't part of the object's metadata
|
private static org.apache.commons.logging.Log |
log
Shared logger
|
X_AMZN_REQUEST_ID_HEADER
Constructor and Description |
---|
AbstractS3ResponseHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
needsConnectionLeftOpen()
The majority of S3 response handlers read the complete response while
handling it, and don't need to manually manage the underlying HTTP
connection.
|
protected AmazonWebServiceResponse<T> |
parseResponseMetadata(HttpResponse response)
Parses the S3 response metadata (ex: AWS request ID) from the specified
response, and returns a AmazonWebServiceResponse
|
protected void |
populateObjectMetadata(HttpResponse response,
ObjectMetadata metadata)
Populates the specified S3ObjectMetadata object with all object metadata
pulled from the headers in the specified response.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handle
private static final org.apache.commons.logging.Log log
private static final java.util.Set<java.lang.String> ignoredHeaders
public boolean needsConnectionLeftOpen()
needsConnectionLeftOpen
in interface HttpResponseHandler<AmazonWebServiceResponse<T>>
HttpResponseHandler.needsConnectionLeftOpen()
protected AmazonWebServiceResponse<T> parseResponseMetadata(HttpResponse response)
response
- The response containing the response metadata to pull out.protected void populateObjectMetadata(HttpResponse response, ObjectMetadata metadata)
response
- The HTTP response containing the object metadata within the
headers.metadata
- The metadata object to populate from the response's headers.