Class RetryableSubAsyncRequestBody
java.lang.Object
software.amazon.awssdk.core.internal.async.RetryableSubAsyncRequestBody
- All Implemented Interfaces:
AutoCloseable,org.reactivestreams.Publisher<ByteBuffer>,AsyncRequestBody,CloseableAsyncRequestBody,SdkPublisher<ByteBuffer>,SubAsyncRequestBody,SdkAutoCloseable
@SdkInternalApi
public final class RetryableSubAsyncRequestBody
extends Object
implements SubAsyncRequestBody
A
SubAsyncRequestBody implementation that supports resubscribe/retry once all data has been published to the first
subscriber-
Nested Class Summary
Nested classes/interfaces inherited from interface software.amazon.awssdk.core.async.AsyncRequestBody
AsyncRequestBody.BodyType -
Constructor Summary
ConstructorsConstructorDescriptionRetryableSubAsyncRequestBody(SubAsyncRequestBodyConfiguration configuration) Creates a new RetryableSubAsyncRequestBody with the given configuration. -
Method Summary
Modifier and TypeMethodDescriptionbody()Each AsyncRequestBody should return a well-formed name that can be used to identify the implementation.voidclose()voidcomplete()Indicate that no moreSubAsyncRequestBody.send(ByteBuffer))} calls will be made, and that stream of messages is completed successfully.longThe maximum length of the content this AsyncRequestBody can hold.intThe part number associated with this SubAsyncRequestBodylongThe length of the bytes receivedvoidsend(ByteBuffer data) Send a byte buffer.voidsubscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.awssdk.core.async.AsyncRequestBody
contentType, split, split, splitCloseable, splitCloseableMethods inherited from interface software.amazon.awssdk.core.async.SdkPublisher
addTrailingData, buffer, doAfterOnCancel, doAfterOnComplete, doAfterOnError, filter, filter, flatMapIterable, limit, map, subscribe
-
Constructor Details
-
RetryableSubAsyncRequestBody
Creates a new RetryableSubAsyncRequestBody with the given configuration.
-
-
Method Details
-
contentLength
- Specified by:
contentLengthin interfaceAsyncRequestBody- Returns:
- The content length of the data being produced.
-
send
Description copied from interface:SubAsyncRequestBodySend a byte buffer.This method must not be invoked concurrently.
- Specified by:
sendin interfaceSubAsyncRequestBody
-
complete
public void complete()Description copied from interface:SubAsyncRequestBodyIndicate that no moreSubAsyncRequestBody.send(ByteBuffer))} calls will be made, and that stream of messages is completed successfully.- Specified by:
completein interfaceSubAsyncRequestBody
-
maxLength
public long maxLength()Description copied from interface:SubAsyncRequestBodyThe 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:
maxLengthin interfaceSubAsyncRequestBody
-
receivedBytesLength
public long receivedBytesLength()Description copied from interface:SubAsyncRequestBodyThe length of the bytes received- Specified by:
receivedBytesLengthin interfaceSubAsyncRequestBody
-
subscribe
- Specified by:
subscribein interfaceorg.reactivestreams.Publisher<ByteBuffer>
-
close
public void close()Description copied from interface:SdkAutoCloseable- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSdkAutoCloseable- Specified by:
closein interfaceSubAsyncRequestBody
-
partNumber
public int partNumber()Description copied from interface:SubAsyncRequestBodyThe part number associated with this SubAsyncRequestBody- Specified by:
partNumberin interfaceSubAsyncRequestBody- Returns:
-
body
Description copied from interface:AsyncRequestBodyEach 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:
bodyin interfaceAsyncRequestBody- Returns:
- String containing the identifying name of this AsyncRequestBody implementation.
-