Class S3ExpressChecksumInterceptor
java.lang.Object
software.amazon.awssdk.services.s3.internal.handlers.S3ExpressChecksumInterceptor
- All Implemented Interfaces:
ExecutionInterceptor
S3Express has different checksum requirements compared to standard S3 calls. This interceptor modifies checksums only
for S3Express calls.
Checksums can be configured through model traits on operations as follows
- httpChecksumRequired - older setting used in S3Control -> not allowed
- httpChecksum is set and required -> always add CRC32 checksum even if algorithm is not specified.
- httpChecksum is set but not required -> if algorithm is not specified, behavior differs
Note that, if httpChecksum is not present, no checksum may be calculated. PutBucketPolicy, DeleteObjects are examples of operations that require checksums. PutObject, UploadPart are examples of operations that do not require checksums.
Special cases
- PutObject -> always calculate CRC32
- UploadPart -> do not calculate CRC32 if algorithm is missing, unless TM is used
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionmodifyHttpRequest
(Context.ModifyHttpRequest context, ExecutionAttributes executionAttributes) Modify theSdkHttpFullRequest
before it is sent to the service.modifyRequest
(Context.ModifyRequest context, ExecutionAttributes executionAttributes) Modify anSdkRequest
given to a service client before it is marshalled into anSdkHttpFullRequest
.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.awssdk.core.interceptor.ExecutionInterceptor
afterExecution, afterMarshalling, afterTransmission, afterUnmarshalling, beforeExecution, beforeMarshalling, beforeTransmission, beforeUnmarshalling, modifyAsyncHttpContent, modifyAsyncHttpResponseContent, modifyException, modifyHttpContent, modifyHttpResponse, modifyHttpResponseContent, modifyResponse, onExecutionFailure
-
Constructor Details
-
S3ExpressChecksumInterceptor
public S3ExpressChecksumInterceptor()
-
-
Method Details
-
modifyRequest
public SdkRequest modifyRequest(Context.ModifyRequest context, ExecutionAttributes executionAttributes) Description copied from interface:ExecutionInterceptor
Modify anSdkRequest
given to a service client before it is marshalled into anSdkHttpFullRequest
.- Specified by:
modifyRequest
in interfaceExecutionInterceptor
- Parameters:
context
- The current state of the execution, including the current SDK request from the service client call.executionAttributes
- A mutable set of attributes scoped to one specific request/response cycle that can be used to give data to future lifecycle methods.- Returns:
- The potentially-modified request that should be used for the rest of the execution. Must not be null.
-
modifyHttpRequest
public SdkHttpRequest modifyHttpRequest(Context.ModifyHttpRequest context, ExecutionAttributes executionAttributes) Description copied from interface:ExecutionInterceptor
Modify theSdkHttpFullRequest
before it is sent to the service.- Specified by:
modifyHttpRequest
in interfaceExecutionInterceptor
- Parameters:
context
- The current state of the execution, including the SDK and current HTTP request.executionAttributes
- A mutable set of attributes scoped to one specific request/response cycle that can be used to give data to future lifecycle methods.- Returns:
- The potentially-modified HTTP request that should be sent to the service. Must not be null.
-