Class SplittingTransformer<ResponseT,ResultT>
- java.lang.Object
-
- software.amazon.awssdk.core.internal.async.SplittingTransformer<ResponseT,ResultT>
-
- All Implemented Interfaces:
org.reactivestreams.Publisher<AsyncResponseTransformer<ResponseT,ResponseT>>,SdkPublisher<AsyncResponseTransformer<ResponseT,ResponseT>>
public class SplittingTransformer<ResponseT,ResultT> extends Object implements SdkPublisher<AsyncResponseTransformer<ResponseT,ResponseT>>
Split aAsyncResponseTransformerinto multiple ones, publishing them as aSdkPublisher. Created using thesplitmethod. The upstreamAsyncResponseTransformerthat is split will receive data from the individual transformers.This publisher also buffers an amount of data before sending it to the upstream transformer, as specified by the maximumBufferSize. ByteBuffers will be published once the buffer has been reached, or when the subscription to this publisher is cancelled.
Cancelling the subscription to this publisher signals that no more data needs to be sent to the upstream transformer. This publisher will then send all data currently buffered to the upstream transformer and complete the downstream subscriber.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSplittingTransformer.Builder<ResponseT,ResultT>
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <ResponseT,ResultT>
SplittingTransformer.Builder<ResponseT,ResultT>builder()voidsubscribe(org.reactivestreams.Subscriber<? super AsyncResponseTransformer<ResponseT,ResponseT>> downstreamSubscriber)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.core.async.SdkPublisher
addTrailingData, buffer, doAfterOnCancel, doAfterOnComplete, doAfterOnError, filter, filter, flatMapIterable, limit, map, subscribe
-
-
-
-
Method Detail
-
subscribe
public void subscribe(org.reactivestreams.Subscriber<? super AsyncResponseTransformer<ResponseT,ResponseT>> downstreamSubscriber)
- Specified by:
subscribein interfaceorg.reactivestreams.Publisher<ResponseT>- Parameters:
downstreamSubscriber- theSubscriberto the individual AsyncResponseTransformer
-
builder
public static <ResponseT,ResultT> SplittingTransformer.Builder<ResponseT,ResultT> builder()
-
-