Class NonRetryableSubAsyncRequestBody
java.lang.Object
software.amazon.awssdk.core.internal.async.NonRetryableSubAsyncRequestBody
- All Implemented Interfaces:
AutoCloseable,org.reactivestreams.Publisher<ByteBuffer>,AsyncRequestBody,CloseableAsyncRequestBody,SdkPublisher<ByteBuffer>,SubAsyncRequestBody,SdkAutoCloseable
@SdkInternalApi
public final class NonRetryableSubAsyncRequestBody
extends Object
implements SubAsyncRequestBody
A
SubAsyncRequestBody implementation that doesn't support resubscribe/retry-
Nested Class Summary
Nested classes/interfaces inherited from interface software.amazon.awssdk.core.async.AsyncRequestBody
AsyncRequestBody.BodyType -
Constructor Summary
ConstructorsConstructorDescriptionNonRetryableSubAsyncRequestBody(SubAsyncRequestBodyConfiguration configuration) Creates a new NonRetryableSubAsyncRequestBody 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.voidcomplete()Indicate that no moreSubAsyncRequestBody.send(ByteBuffer))} calls will be made, and that stream of messages is completed successfully.voidlongThe 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, subscribeMethods inherited from interface software.amazon.awssdk.core.internal.async.SubAsyncRequestBody
close
-
Constructor Details
-
NonRetryableSubAsyncRequestBody
Creates a new NonRetryableSubAsyncRequestBody 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
-
partNumber
public int partNumber()Description copied from interface:SubAsyncRequestBodyThe part number associated with this SubAsyncRequestBody- Specified by:
partNumberin interfaceSubAsyncRequestBody- Returns:
-
error
-
subscribe
- Specified by:
subscribein interfaceorg.reactivestreams.Publisher<ByteBuffer>
-
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.
-