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.
| Constructor and Description |
|---|
SplittingPublisher(AsyncRequestBody asyncRequestBody,
AsyncRequestBodySplitConfiguration splitConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
void |
subscribe(<any> downstreamSubscriber)
Subscribes to the publisher with the given
Consumer. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadapt, addTrailingData, buffer, doAfterOnCancel, doAfterOnComplete, doAfterOnError, filter, filter, flatMapIterable, limit, mappublic SplittingPublisher(AsyncRequestBody asyncRequestBody, AsyncRequestBodySplitConfiguration splitConfiguration)
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.