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.

  • Method Details

    • subscribe

      public void subscribe(org.reactivestreams.Subscriber<? super AsyncResponseTransformer<ResponseT,ResponseT>> downstreamSubscriber)
      Specified by:
      subscribe in interface org.reactivestreams.Publisher<ResponseT>
      Parameters:
      downstreamSubscriber - the Subscriber to the individual AsyncResponseTransformer
    • builder

      public static <ResponseT, ResultT> SplittingTransformer.Builder<ResponseT,ResultT> builder()