Class NonRetryableSubAsyncRequestBody

java.lang.Object
software.amazon.awssdk.core.internal.async.NonRetryableSubAsyncRequestBody
All Implemented Interfaces:
AutoCloseable, org.reactivestreams.Publisher<ByteBuffer>, AsyncRequestBody, CloseableAsyncRequestBody, SdkPublisher<ByteBuffer>, SubAsyncRequestBody, SdkAutoCloseable

public final class NonRetryableSubAsyncRequestBody extends Object implements SubAsyncRequestBody
A SubAsyncRequestBody implementation that doesn't support resubscribe/retry
  • Constructor Details

    • NonRetryableSubAsyncRequestBody

      public NonRetryableSubAsyncRequestBody(SubAsyncRequestBodyConfiguration configuration)
      Creates a new NonRetryableSubAsyncRequestBody with the given configuration.
  • Method Details

    • contentLength

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

      public void send(ByteBuffer data)
      Description copied from interface: SubAsyncRequestBody
      Send a byte buffer.

      This method must not be invoked concurrently.

      Specified by:
      send in interface SubAsyncRequestBody
    • complete

      public void complete()
      Description copied from interface: SubAsyncRequestBody
      Indicate that no more SubAsyncRequestBody.send(ByteBuffer) )} calls will be made, and that stream of messages is completed successfully.
      Specified by:
      complete in interface SubAsyncRequestBody
    • maxLength

      public long maxLength()
      Description copied from interface: SubAsyncRequestBody
      The maximum length of the content this AsyncRequestBody can hold. If the upstream content length is known, this should be the same as receivedBytesLength
      Specified by:
      maxLength in interface SubAsyncRequestBody
    • receivedBytesLength

      public long receivedBytesLength()
      Description copied from interface: SubAsyncRequestBody
      The length of the bytes received
      Specified by:
      receivedBytesLength in interface SubAsyncRequestBody
    • partNumber

      public int partNumber()
      Description copied from interface: SubAsyncRequestBody
      The part number associated with this SubAsyncRequestBody
      Specified by:
      partNumber in interface SubAsyncRequestBody
      Returns:
    • error

      public void error(Throwable error)
    • subscribe

      public void subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s)
      Specified by:
      subscribe in interface org.reactivestreams.Publisher<ByteBuffer>
    • 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.