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
ASubAsyncRequestBodyimplementation 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
Constructors Constructor Description NonRetryableSubAsyncRequestBody(SubAsyncRequestBodyConfiguration configuration)Creates a new NonRetryableSubAsyncRequestBody with the given configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringbody()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.Optional<Long>contentLength()voiderror(Throwable error)longmaxLength()The maximum length of the content this AsyncRequestBody can hold.intpartNumber()The part number associated with this SubAsyncRequestBodylongreceivedBytesLength()The 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
clone, equals, finalize, 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
-
Methods inherited from interface software.amazon.awssdk.core.internal.async.SubAsyncRequestBody
close
-
-
-
-
Constructor Detail
-
NonRetryableSubAsyncRequestBody
public NonRetryableSubAsyncRequestBody(SubAsyncRequestBodyConfiguration configuration)
Creates a new NonRetryableSubAsyncRequestBody with the given configuration.
-
-
Method Detail
-
contentLength
public Optional<Long> contentLength()
- Specified by:
contentLengthin interfaceAsyncRequestBody- Returns:
- The content length of the data being produced.
-
send
public void send(ByteBuffer data)
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
public void error(Throwable error)
-
subscribe
public void subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s)
- Specified by:
subscribein interfaceorg.reactivestreams.Publisher<ByteBuffer>
-
body
public String 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.
-
-