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
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.void
close()
void
complete()
Indicate that no moreSubAsyncRequestBody.send(ByteBuffer)
)} calls will be made, and that stream of messages is completed successfully.long
The maximum length of the content this AsyncRequestBody can hold.int
The part number associated with this SubAsyncRequestBodylong
The length of the bytes receivedvoid
send
(ByteBuffer data) Send a byte buffer.void
subscribe
(org.reactivestreams.Subscriber<? super ByteBuffer> s) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.awssdk.core.async.AsyncRequestBody
contentType, split, split, splitCloseable, splitCloseable
Methods 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:
contentLength
in interfaceAsyncRequestBody
- Returns:
- The content length of the data being produced.
-
send
Description copied from interface:SubAsyncRequestBody
Send a byte buffer.This method must not be invoked concurrently.
- Specified by:
send
in interfaceSubAsyncRequestBody
-
complete
public void complete()Description copied from interface:SubAsyncRequestBody
Indicate that no moreSubAsyncRequestBody.send(ByteBuffer)
)} calls will be made, and that stream of messages is completed successfully.- Specified by:
complete
in interfaceSubAsyncRequestBody
-
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 interfaceSubAsyncRequestBody
-
receivedBytesLength
public long receivedBytesLength()Description copied from interface:SubAsyncRequestBody
The length of the bytes received- Specified by:
receivedBytesLength
in interfaceSubAsyncRequestBody
-
subscribe
- Specified by:
subscribe
in interfaceorg.reactivestreams.Publisher<ByteBuffer>
-
close
public void close()Description copied from interface:SdkAutoCloseable
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceSdkAutoCloseable
- Specified by:
close
in interfaceSubAsyncRequestBody
-
partNumber
public int partNumber()Description copied from interface:SubAsyncRequestBody
The part number associated with this SubAsyncRequestBody- Specified by:
partNumber
in interfaceSubAsyncRequestBody
- Returns:
-
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 interfaceAsyncRequestBody
- Returns:
- String containing the identifying name of this AsyncRequestBody implementation.
-