public final class ChecksumsEnabledValidator extends Object
SyncChecksumValidationInterceptor and
AsyncChecksumValidationInterceptor to determine if trailing checksums
should be enabled for a given request.| Modifier and Type | Field and Description |
|---|---|
static ExecutionAttribute<SdkChecksum> |
CHECKSUM |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
getObjectChecksumEnabledPerRequest(SdkRequest request,
ExecutionAttributes executionAttributes)
Checks if trailing checksum is enabled for
S3Client.getObject(GetObjectRequest) per request. |
static boolean |
getObjectChecksumEnabledPerResponse(SdkRequest request,
SdkHttpHeaders responseHeaders)
Checks if trailing checksum is enabled for
S3Client.getObject(GetObjectRequest) per response. |
static boolean |
responseChecksumIsValid(SdkHttpResponse httpResponse) |
static boolean |
shouldRecordChecksum(SdkRequest sdkRequest,
ClientType expectedClientType,
ExecutionAttributes executionAttributes,
SdkHttpRequest httpRequest)
Validates that checksums should be enabled based on
ClientType and the presence
or S3 specific headers. |
static void |
validatePutObjectChecksum(PutObjectResponse response,
ExecutionAttributes executionAttributes)
Client side validation for
PutObjectRequest |
public static final ExecutionAttribute<SdkChecksum> CHECKSUM
public static boolean getObjectChecksumEnabledPerRequest(SdkRequest request, ExecutionAttributes executionAttributes)
S3Client.getObject(GetObjectRequest) per request.request - the requestexecutionAttributes - the executionAttributespublic static boolean getObjectChecksumEnabledPerResponse(SdkRequest request, SdkHttpHeaders responseHeaders)
S3Client.getObject(GetObjectRequest) per response.request - the requestresponseHeaders - the response headerspublic static boolean shouldRecordChecksum(SdkRequest sdkRequest, ClientType expectedClientType, ExecutionAttributes executionAttributes, SdkHttpRequest httpRequest)
ClientType and the presence
or S3 specific headers.expectedClientType - - The expected client type for enabling checksumsexecutionAttributes - - ExecutionAttributes to determine the actual client typepublic static boolean responseChecksumIsValid(SdkHttpResponse httpResponse)
public static void validatePutObjectChecksum(PutObjectResponse response, ExecutionAttributes executionAttributes)
PutObjectRequestresponse - the responseexecutionAttributes - the execution attributesCopyright © 2023. All rights reserved.