Class AsyncRequestBodyListener.NotifyingAsyncRequestBody
- java.lang.Object
-
- software.amazon.awssdk.core.async.listener.AsyncRequestBodyListener.NotifyingAsyncRequestBody
-
- All Implemented Interfaces:
org.reactivestreams.Publisher<ByteBuffer>,AsyncRequestBody,SdkPublisher<ByteBuffer>
- Enclosing interface:
- AsyncRequestBodyListener
public static final class AsyncRequestBodyListener.NotifyingAsyncRequestBody extends Object implements AsyncRequestBody
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface software.amazon.awssdk.core.async.AsyncRequestBody
AsyncRequestBody.BodyType
-
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.core.async.AsyncRequestBody
body
-
Methods inherited from interface software.amazon.awssdk.core.async.SdkPublisher
addTrailingData, buffer, doAfterOnCancel, doAfterOnComplete, doAfterOnError, filter, filter, flatMapIterable, limit, map, subscribe
-
-
-
-
Method Detail
-
contentLength
public Optional<Long> contentLength()
- Specified by:
contentLengthin interfaceAsyncRequestBody- Returns:
- The content length of the data being produced.
-
contentType
public String contentType()
- Specified by:
contentTypein interfaceAsyncRequestBody- Returns:
- The content type of the data being produced.
-
split
public SdkPublisher<AsyncRequestBody> split(AsyncRequestBodySplitConfiguration splitConfiguration)
Description copied from interface:AsyncRequestBodyConverts thisAsyncRequestBodyto a publisher ofAsyncRequestBodys, each of which publishes a specific portion of the original data, based on the providedAsyncRequestBodySplitConfiguration. The default chunk size is 2MB and the default buffer size is 8MB.By default, if content length of this
AsyncRequestBodyis present, each dividedAsyncRequestBodyis 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 configuredmaxMemoryUsageInBytesmust be larger than or equal tochunkSizeInBytes. Note that this behavior may be different if a specific implementation of this interface overrides this method.- Specified by:
splitin interfaceAsyncRequestBody
-
split
public SdkPublisher<AsyncRequestBody> split(Consumer<AsyncRequestBodySplitConfiguration.Builder> splitConfiguration)
Description copied from interface:AsyncRequestBodyThis is a convenience method that passes an instance of theAsyncRequestBodySplitConfigurationbuilder, avoiding the need to create one manually viaAsyncRequestBodySplitConfiguration.builder().- Specified by:
splitin interfaceAsyncRequestBody- See Also:
AsyncRequestBody.split(AsyncRequestBodySplitConfiguration)
-
splitCloseable
public SdkPublisher<CloseableAsyncRequestBody> splitCloseable(AsyncRequestBodySplitConfiguration splitConfiguration)
Description copied from interface:AsyncRequestBodyConverts thisAsyncRequestBodyto a publisher ofCloseableAsyncRequestBodys, each of which publishes specific portion of the original data, based on the providedAsyncRequestBodySplitConfiguration. The default chunk size is 2MB and the default buffer size is 8MB.The default implementation behaves the same as
AsyncRequestBody.split(AsyncRequestBodySplitConfiguration). This behavior may vary in different implementations.Caller is responsible for closing
CloseableAsyncRequestBodywhen it is ready to be disposed to release any resources.Note: This method is primarily intended for use by AWS SDK high-level libraries and internal components. SDK customers should typically use higher-level APIs provided by service clients rather than calling this method directly.
- Specified by:
splitCloseablein interfaceAsyncRequestBody- See Also:
AsyncRequestBody.splitCloseable(Consumer),AsyncRequestBodySplitConfiguration
-
splitCloseable
public SdkPublisher<CloseableAsyncRequestBody> splitCloseable(Consumer<AsyncRequestBodySplitConfiguration.Builder> splitConfiguration)
Description copied from interface:AsyncRequestBodyThis is a convenience method that passes an instance of theAsyncRequestBodySplitConfigurationbuilder, avoiding the need to create one manually viaAsyncRequestBodySplitConfiguration.builder().Note: This method is primarily intended for use by AWS SDK high-level libraries and internal components. SDK customers should typically use higher-level APIs provided by service clients rather than calling this method directly.
- Specified by:
splitCloseablein interfaceAsyncRequestBody- See Also:
AsyncRequestBody.splitCloseable(AsyncRequestBodySplitConfiguration)
-
subscribe
public void subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s)
- Specified by:
subscribein interfaceorg.reactivestreams.Publisher<ByteBuffer>
-
-