Class ByteBuffersAsyncRequestBody

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

public final class ByteBuffersAsyncRequestBody extends Object implements AsyncRequestBody, SdkAutoCloseable
An implementation of AsyncRequestBody for providing data from the supplied ByteBuffer array. This is created using static methods on AsyncRequestBody

Subscription Behavior:

  • Each subscriber receives a read-only view of the buffered data
  • Subscribers receive data independently based on their own demand signaling
  • If the body is closed, new subscribers will receive an error immediately

Resource Management:

The body should be closed when no longer needed to free buffered data and notify active subscribers. Closing the body will:
  • Clear all buffered data
  • Send error notifications to all active subscribers
  • Prevent new subscriptions
See Also: