Class GetBucketPolicyInterceptor

java.lang.Object
software.amazon.awssdk.services.s3.internal.handlers.GetBucketPolicyInterceptor
All Implemented Interfaces:
ExecutionInterceptor

public final class GetBucketPolicyInterceptor extends Object implements ExecutionInterceptor
GetBucketPolicy returns just JSON so we wrap in XML so that it is unmarshalled correctly.
  • Constructor Details

    • GetBucketPolicyInterceptor

      public GetBucketPolicyInterceptor()
  • Method Details

    • modifyHttpResponseContent

      public Optional<InputStream> modifyHttpResponseContent(Context.ModifyHttpResponse context, ExecutionAttributes executionAttributes)
      Description copied from interface: ExecutionInterceptor
      Modify the SdkHttpFullRequest before it is unmarshalled into an SdkResponse.

      Note: Unlike many other lifecycle methods, this one may be invoked multiple times. If the RetryPolicy determines the error code returned by the service is retriable, this will be invoked for each response returned by the service.

      Specified by:
      modifyHttpResponseContent in interface ExecutionInterceptor
      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 HTTP response that should be given to the unmarshaller. Must not be null.
    • modifyAsyncHttpResponseContent

      public Optional<org.reactivestreams.Publisher<ByteBuffer>> modifyAsyncHttpResponseContent(Context.ModifyHttpResponse context, ExecutionAttributes executionAttributes)
      Description copied from interface: ExecutionInterceptor
      Modify the SdkHttpFullRequest before it is unmarshalled into an SdkResponse.

      Note: Unlike many other lifecycle methods, this one may be invoked multiple times. If the RetryPolicy determines the error code returned by the service is retriable, this will be invoked for each response returned by the service.

      Specified by:
      modifyAsyncHttpResponseContent in interface ExecutionInterceptor
      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 HTTP response that should be given to the unmarshaller. Must not be null.