Class EnableTrailingChecksumInterceptor
java.lang.Object
software.amazon.awssdk.services.s3.internal.handlers.EnableTrailingChecksumInterceptor
- All Implemented Interfaces:
ExecutionInterceptor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionmodifyHttpRequest
(Context.ModifyHttpRequest context, ExecutionAttributes executionAttributes) Append trailing checksum header forGetObjectRequest
if trailing checksum is enabled from config,ChecksumMode
is disabled, and is not S3Express.modifyRequest
(Context.ModifyRequest context, ExecutionAttributes executionAttributes) EnableChecksumMode
forGetObjectRequest
if trailing checksum is enabled from config,ChecksumMode
is disabled, and is S3Express.modifyResponse
(Context.ModifyResponse context, ExecutionAttributes executionAttributes) Subtract the contentLength ofGetObjectResponse
if trailing checksums is enabled.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, onExecutionFailure
-
Constructor Details
-
EnableTrailingChecksumInterceptor
public EnableTrailingChecksumInterceptor()
-
-
Method Details
-
modifyRequest
public SdkRequest modifyRequest(Context.ModifyRequest context, ExecutionAttributes executionAttributes) EnableChecksumMode
forGetObjectRequest
if trailing checksum is enabled from config,ChecksumMode
is disabled, and is S3Express. TODO (s3express) - refactor to migrate out s3express specific code- 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) Append trailing checksum header forGetObjectRequest
if trailing checksum is enabled from config,ChecksumMode
is disabled, and is not S3Express.- 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.
-
modifyResponse
public SdkResponse modifyResponse(Context.ModifyResponse context, ExecutionAttributes executionAttributes) Subtract the contentLength ofGetObjectResponse
if trailing checksums is enabled.- Specified by:
modifyResponse
in interfaceExecutionInterceptor
- Parameters:
context
- The current state of the execution, including the SDK and HTTP requests as well as the SDK and HTTP response.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 SDK response that should be returned by the client. Must not be null.
-