Class InMemoryPublisher

java.lang.Object
software.amazon.awssdk.http.auth.aws.internal.signer.io.InMemoryPublisher
All Implemented Interfaces:
org.reactivestreams.Publisher<ByteBuffer>, SdkHttpContentPublisher

@SdkInternalApi public class InMemoryPublisher extends Object implements SdkHttpContentPublisher
A content-length-aware publisher that replays buffered data. Used by ChecksumSubscriber to replay the payload after checksumming.
  • Constructor Details

    • InMemoryPublisher

      public InMemoryPublisher(List<ByteBuffer> data, long length)
  • Method Details

    • contentLength

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

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