Class BlockingOutputStreamAsyncRequestBody
- java.lang.Object
- 
- software.amazon.awssdk.core.async.BlockingOutputStreamAsyncRequestBody
 
- 
- All Implemented Interfaces:
- org.reactivestreams.Publisher<ByteBuffer>,- AsyncRequestBody,- SdkPublisher<ByteBuffer>
 
 public final class BlockingOutputStreamAsyncRequestBody extends Object implements AsyncRequestBody An implementation ofAsyncRequestBodythat allows performing a blocking write of an output stream to a downstream service.The caller is responsible for calling OutputStream.close()on theoutputStream()when writing is complete.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classBlockingOutputStreamAsyncRequestBody.Builder- 
Nested classes/interfaces inherited from interface software.amazon.awssdk.core.async.AsyncRequestBodyAsyncRequestBody.BodyType
 
- 
 - 
Method SummaryAll Methods Static 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.static BlockingOutputStreamAsyncRequestBody.Builderbuilder()Creates a default builder forBlockingOutputStreamAsyncRequestBody.Optional<Long>contentLength()CancellableOutputStreamoutputStream()Return an output stream to which blocking writes can be made to the downstream service.voidsubscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s)- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface software.amazon.awssdk.core.async.AsyncRequestBodycontentType, split, split, splitCloseable, splitCloseable
 - 
Methods inherited from interface software.amazon.awssdk.core.async.SdkPublisheraddTrailingData, buffer, doAfterOnCancel, doAfterOnComplete, doAfterOnError, filter, filter, flatMapIterable, limit, map, subscribe
 
- 
 
- 
- 
- 
Method Detail- 
outputStreampublic CancellableOutputStream outputStream() Return an output stream to which blocking writes can be made to the downstream service.This method will block the calling thread until the SDK is connected to the service. This means that this request body should usually be passed to the SDK before this method is called. You can invoke CancellableOutputStream.cancel()to cancel any blocked write calls to the downstream service (and mark the stream as failed).
 - 
builderpublic static BlockingOutputStreamAsyncRequestBody.Builder builder() Creates a default builder forBlockingOutputStreamAsyncRequestBody.
 - 
contentLengthpublic Optional<Long> contentLength() - Specified by:
- contentLengthin interface- AsyncRequestBody
- Returns:
- The content length of the data being produced.
 
 - 
subscribepublic void subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s) - Specified by:
- subscribein interface- org.reactivestreams.Publisher<ByteBuffer>
 
 - 
bodypublic 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 interface- AsyncRequestBody
- Returns:
- String containing the identifying name of this AsyncRequestBody implementation.
 
 
- 
 
-