public class InputStreamWithExecutorAsyncRequestBody extends Object implements AsyncRequestBody
AsyncRequestBody that allows reading data off of an InputStream using a background
ExecutorService.
Created via AsyncRequestBody.fromInputStream(InputStream, Long, ExecutorService).
| Constructor and Description |
|---|
InputStreamWithExecutorAsyncRequestBody(InputStream inputStream,
Long contentLength,
ExecutorService executor) |
| Modifier and Type | Method and Description |
|---|---|
Future<?> |
activeWriteFuture() |
Optional<Long> |
contentLength() |
void |
subscribe(<any> s)
Subscribes to the publisher with the given
Consumer. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontentType, empty, forBlockingInputStream, forBlockingOutputStream, fromByteBuffer, fromBytes, fromFile, fromFile, fromInputStream, fromPublisher, fromString, fromStringadapt, buffer, doAfterOnCancel, doAfterOnComplete, doAfterOnError, filter, filter, flatMapIterable, limit, mappublic InputStreamWithExecutorAsyncRequestBody(InputStream inputStream, Long contentLength, ExecutorService executor)
public Optional<Long> contentLength()
contentLength in interface AsyncRequestBodypublic void subscribe(<any> s)
SdkPublisherConsumer. This consumer will be called for each event
published. There is no backpressure using this method if the Consumer dispatches processing asynchronously. If more
control over backpressure is required, consider using #subscribe(Subscriber).subscribe in interface SdkPublisher<ByteBuffer>s - Consumer to process event.public Future<?> activeWriteFuture()
Copyright © 2023. All rights reserved.