/** * Parses the S3 response metadata (ex: AWS request ID) from the specified * response, and returns a AmazonWebServiceResponse<T> object ready for the * result to be plugged in. * * @param response * The response containing the response metadata to pull out. * * @return A new, populated AmazonWebServiceResponse<T> object, ready for * the result to be plugged in. */ protected AmazonWebServiceResponse<T> parseResponseMetadata(HttpResponse response) { AmazonWebServiceResponse<T> awsResponse = new AmazonWebServiceResponse<T>(); String awsRequestId = response.getHeaders().get(Headers.REQUEST_ID); String hostId = response.getHeaders().get(Headers.EXTENDED_REQUEST_ID); String cloudFrontId = response.getHeaders().get(Headers.CLOUD_FRONT_ID); Map<String, String> metadataMap = new HashMap<String, String>(); metadataMap.put(ResponseMetadata.AWS_REQUEST_ID, awsRequestId); metadataMap.put(S3ResponseMetadata.HOST_ID, hostId); metadataMap.put(S3ResponseMetadata.CLOUD_FRONT_ID, cloudFrontId); awsResponse.setResponseMetadata(new S3ResponseMetadata(metadataMap)); return awsResponse; }
@Override public S3ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) { return delegate.getCachedResponseMetadata(request); }
@Override public S3ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) { throw new UnsupportedOperationException(); }
@Override public S3ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) { return getDelegate().getCachedResponseMetadata(request); }
@Override public S3ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) { return null; }
@Override public S3ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) { throw new TajoInternalError(new UnsupportedException()); }
@Override public S3ResponseMetadata getCachedResponseMetadata(final AmazonWebServiceRequest request) { throw new UnsupportedOperationException(); }
@Override public S3ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) { // TODO Auto-generated method stub return null; }