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 a
AsyncResponseTransformer into multiple ones, publishing them as a SdkPublisher. Created using the
split method. The upstream
AsyncResponseTransformer that 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 ClassesModifier and TypeClassDescriptionstatic final class -
Method Summary
Modifier and TypeMethodDescriptionstatic <ResponseT,ResultT>
SplittingTransformer.Builder<ResponseT, ResultT> builder()voidsubscribe(org.reactivestreams.Subscriber<? super AsyncResponseTransformer<ResponseT, ResponseT>> downstreamSubscriber) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.awssdk.core.async.SdkPublisher
addTrailingData, buffer, doAfterOnCancel, doAfterOnComplete, doAfterOnError, filter, filter, flatMapIterable, limit, map, subscribe
-
Method Details
-
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
-