public abstract class AbstractCosResponseHandler<T> extends Object implements HttpResponseHandler<CosServiceResponse<T>>
| Constructor and Description |
|---|
AbstractCosResponseHandler() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
needsConnectionLeftOpen()
The majority of COS response handlers read the complete response while handling it, and don't
need to manually manage the underlying HTTP connection.
|
protected CosServiceResponse<T> |
parseResponseMetadata(CosHttpResponse response)
Parses the COS response metadata (ex: COS request ID) from the specified response, and
returns a CosServiceResponse
|
protected void |
populateObjectMetadata(CosHttpResponse response,
ObjectMetadata metadata)
Populates the specified COSObjectMetadata object with all object metadata pulled from the
headers in the specified response.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlepublic boolean needsConnectionLeftOpen()
needsConnectionLeftOpen in interface HttpResponseHandler<CosServiceResponse<T>>protected CosServiceResponse<T> parseResponseMetadata(CosHttpResponse response)
response - The response containing the response metadata to pull out.protected void populateObjectMetadata(CosHttpResponse 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.Copyright © 2023. All rights reserved.