public static final class AsyncRequestBodyListener.NotifyingAsyncRequestBody extends Object implements AsyncRequestBody
| Modifier and Type | Method and Description |
|---|---|
Optional<Long> |
contentLength() |
String |
contentType() |
SdkPublisher<AsyncRequestBody> |
split(AsyncRequestBodySplitConfiguration splitConfiguration)
Converts this
AsyncRequestBody to a publisher of AsyncRequestBodys, each of which publishes a specific
portion of the original data, based on the provided AsyncRequestBodySplitConfiguration. |
SdkPublisher<AsyncRequestBody> |
split(Consumer<AsyncRequestBodySplitConfiguration.Builder> splitConfiguration)
This is a convenience method that passes an instance of the
AsyncRequestBodySplitConfiguration builder,
avoiding the need to create one manually via AsyncRequestBodySplitConfiguration.builder(). |
void |
subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitempty, forBlockingInputStream, forBlockingOutputStream, fromByteBuffer, fromByteBuffers, fromByteBuffersUnsafe, fromByteBufferUnsafe, fromBytes, fromBytesUnsafe, fromFile, fromFile, fromFile, fromFile, fromInputStream, fromInputStream, fromInputStream, fromPublisher, fromRemainingByteBuffer, fromRemainingByteBuffers, fromRemainingByteBuffersUnsafe, fromRemainingByteBufferUnsafe, fromString, fromStringadapt, addTrailingData, buffer, doAfterOnCancel, doAfterOnComplete, doAfterOnError, filter, filter, flatMapIterable, fromIterable, limit, map, subscribepublic Optional<Long> contentLength()
contentLength in interface AsyncRequestBodypublic String contentType()
contentType in interface AsyncRequestBodypublic SdkPublisher<AsyncRequestBody> split(AsyncRequestBodySplitConfiguration splitConfiguration)
AsyncRequestBodyAsyncRequestBody to a publisher of AsyncRequestBodys, each of which publishes a specific
portion of the original data, based on the provided AsyncRequestBodySplitConfiguration. The default chunk size
is 2MB and the default buffer size is 8MB.
By default, if content length of this AsyncRequestBody is present, each divided AsyncRequestBody is
delivered to the subscriber right after it's initialized. On the other hand, if content length is null, it is sent after
the entire content for that chunk is buffered. In this case, the configured maxMemoryUsageInBytes must be larger
than or equal to chunkSizeInBytes. Note that this behavior may be different if a specific implementation of this
interface overrides this method.
split in interface AsyncRequestBodyAsyncRequestBodySplitConfigurationpublic SdkPublisher<AsyncRequestBody> split(Consumer<AsyncRequestBodySplitConfiguration.Builder> splitConfiguration)
AsyncRequestBodyAsyncRequestBodySplitConfiguration builder,
avoiding the need to create one manually via AsyncRequestBodySplitConfiguration.builder().split in interface AsyncRequestBodyAsyncRequestBody.split(AsyncRequestBodySplitConfiguration)public void subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s)
subscribe in interface org.reactivestreams.Publisher<ByteBuffer>Copyright © 2026. All rights reserved.