Class ChecksumCalculatingAsyncRequestBody

java.lang.Object
software.amazon.awssdk.core.internal.async.ChecksumCalculatingAsyncRequestBody
All Implemented Interfaces:
org.reactivestreams.Publisher<ByteBuffer>, AsyncRequestBody, SdkPublisher<ByteBuffer>

@SdkInternalApi public class ChecksumCalculatingAsyncRequestBody extends Object implements AsyncRequestBody
Wrapper class to wrap an AsyncRequestBody to calculate checksum as it reads data and append Checksum as trailer at the end.

This is only used by non-sra code path, i.e., when a custom legacy signer is provided.

  • Method Details

    • builder

      Returns:
      Builder instance to construct a FileAsyncRequestBody.
    • contentLength

      public Optional<Long> contentLength()
      Specified by:
      contentLength in interface AsyncRequestBody
      Returns:
      The content length of the data being produced.
    • contentType

      public String contentType()
      Specified by:
      contentType in interface AsyncRequestBody
      Returns:
      The content type of the data being produced.
    • body

      public String body()
      Description copied from interface: AsyncRequestBody
      Each AsyncRequestBody should return a well-formed name that can be used to identify the implementation. The body name should only include alphanumeric characters.
      Specified by:
      body in interface AsyncRequestBody
      Returns:
      String containing the identifying name of this AsyncRequestBody implementation.
    • subscribe

      public void subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s)
      Specified by:
      subscribe in interface org.reactivestreams.Publisher<ByteBuffer>