public final class BlockingOutputStreamAsyncRequestBody extends Object implements AsyncRequestBody
AsyncRequestBody that allows performing a blocking write of an output stream to a downstream
service.
The caller is responsible for calling OutputStream.close() on the outputStream() when writing is
complete.
| Modifier and Type | Class and Description |
|---|---|
static class |
BlockingOutputStreamAsyncRequestBody.Builder |
| Modifier and Type | Method and Description |
|---|---|
static BlockingOutputStreamAsyncRequestBody.Builder |
builder()
Creates a default builder for
BlockingOutputStreamAsyncRequestBody. |
Optional<Long> |
contentLength() |
CancellableOutputStream |
outputStream()
Return an output stream to which blocking writes can be made to the downstream service.
|
void |
subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontentType, empty, forBlockingInputStream, forBlockingOutputStream, fromByteBuffer, fromByteBuffers, fromByteBuffersUnsafe, fromByteBufferUnsafe, fromBytes, fromBytesUnsafe, fromFile, fromFile, fromFile, fromFile, fromInputStream, fromInputStream, fromInputStream, fromPublisher, fromRemainingByteBuffer, fromRemainingByteBuffers, fromRemainingByteBuffersUnsafe, fromRemainingByteBufferUnsafe, fromString, fromString, split, splitadapt, addTrailingData, buffer, doAfterOnCancel, doAfterOnComplete, doAfterOnError, filter, filter, flatMapIterable, fromIterable, limit, map, subscribepublic CancellableOutputStream outputStream()
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).
public static BlockingOutputStreamAsyncRequestBody.Builder builder()
BlockingOutputStreamAsyncRequestBody.public Optional<Long> contentLength()
contentLength in interface AsyncRequestBodypublic void subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s)
subscribe in interface org.reactivestreams.Publisher<ByteBuffer>Copyright © 2026. All rights reserved.