Class HttpChecksumValidationInterceptor
- All Implemented Interfaces:
ExecutionInterceptor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional<org.reactivestreams.Publisher<ByteBuffer>>modifyAsyncHttpResponseContent(Context.ModifyHttpResponse context, ExecutionAttributes executionAttributes) Modify the asynchronous HTTP response content before it is unmarshalled into anSdkResponse.modifyHttpResponseContent(Context.ModifyHttpResponse context, ExecutionAttributes executionAttributes) Modify the synchronous HTTP response content before it is unmarshalled into anSdkResponse.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.awssdk.core.interceptor.ExecutionInterceptor
afterExecution, afterMarshalling, afterTransmission, afterUnmarshalling, beforeExecution, beforeMarshalling, beforeTransmission, beforeUnmarshalling, modifyAsyncHttpContent, modifyException, modifyHttpContent, modifyHttpRequest, modifyHttpResponse, modifyRequest, modifyResponse, onExecutionFailure
-
Constructor Details
-
HttpChecksumValidationInterceptor
public HttpChecksumValidationInterceptor()
-
-
Method Details
-
modifyHttpResponseContent
public Optional<InputStream> modifyHttpResponseContent(Context.ModifyHttpResponse context, ExecutionAttributes executionAttributes) Description copied from interface:ExecutionInterceptorModify the synchronous HTTP response content before it is unmarshalled into anSdkResponse.An interceptor that replaces the current response stream is responsible for the lifecycle of the previous stream. The replacement should consume or wrap the previous stream, or close it if it is no longer needed.
Note: Unlike many other lifecycle methods, this one may be invoked multiple times. If the
RetryPolicydetermines the error code returned by the service is retriable, this will be invoked for each response returned by the service.- Specified by:
modifyHttpResponseContentin interfaceExecutionInterceptor- Parameters:
context- The current state of the execution, including the SDK and HTTP requests and the current 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 response content stream that should be given to the unmarshaller.
-
modifyAsyncHttpResponseContent
public Optional<org.reactivestreams.Publisher<ByteBuffer>> modifyAsyncHttpResponseContent(Context.ModifyHttpResponse context, ExecutionAttributes executionAttributes) Description copied from interface:ExecutionInterceptorModify the asynchronous HTTP response content before it is unmarshalled into anSdkResponse.An interceptor that replaces the current response publisher is responsible for the lifecycle of the previous publisher. The replacement should consume or wrap the previous publisher, or cancel it if it is no longer needed.
Note: Unlike many other lifecycle methods, this one may be invoked multiple times. If the
RetryPolicydetermines the error code returned by the service is retriable, this will be invoked for each response returned by the service.- Specified by:
modifyAsyncHttpResponseContentin interfaceExecutionInterceptor- Parameters:
context- The current state of the execution, including the SDK and HTTP requests and the current 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 response content publisher that should be given to the unmarshaller.
-