public class SplittingPublisher extends Object implements SdkPublisher<AsyncRequestBody>
AsyncRequestBody to multiple smaller AsyncRequestBodys, each of which publishes a specific portion of
the original data.
If content length is known, each AsyncRequestBody is sent to the subscriber right after it's initialized.
Otherwise, it is sent after the entire content for that chunk is buffered. This is required to get content length.
| Modifier and Type | Class and Description |
|---|---|
static class |
SplittingPublisher.Builder |
| Modifier and Type | Method and Description |
|---|---|
static SplittingPublisher.Builder |
builder() |
void |
subscribe(<any> downstreamSubscriber)
Subscribes to the publisher with the given
Consumer. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadapt, buffer, doAfterOnCancel, doAfterOnComplete, doAfterOnError, filter, filter, flatMapIterable, limit, mappublic static SplittingPublisher.Builder builder()
public void subscribe(<any> downstreamSubscriber)
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<AsyncRequestBody>downstreamSubscriber - Consumer to process event.Copyright © 2023. All rights reserved.