Class CopySourceInterceptor
java.lang.Object
software.amazon.awssdk.services.s3.internal.handlers.CopySourceInterceptor
- All Implemented Interfaces:
ExecutionInterceptor
This interceptor transforms the
sourceBucket
, sourceKey
, and sourceVersionId
parameters for
CopyObjectRequest
and UploadPartCopyRequest
into a copySource
parameter. The logic needed to
construct a copySource
can be considered non-trivial, so this interceptor facilitates allowing users to
use higher-level constructs that more closely match other APIs, like PutObjectRequest
. Additionally, this
interceptor is responsible for URL encoding the relevant portions of the copySource
value.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionmodifyRequest
(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, modifyHttpRequest, modifyHttpResponse, modifyHttpResponseContent, modifyResponse, onExecutionFailure
-
Constructor Details
-
CopySourceInterceptor
public CopySourceInterceptor()
-
-
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.
-