Class DelegatingBufferingSubscriber
- java.lang.Object
-
- software.amazon.awssdk.utils.async.DelegatingSubscriber<T,U>
-
- software.amazon.awssdk.utils.async.BaseSubscriberAdapter<ByteBuffer,ByteBuffer>
-
- software.amazon.awssdk.utils.async.DelegatingBufferingSubscriber
-
- All Implemented Interfaces:
org.reactivestreams.Subscriber<ByteBuffer>
public class DelegatingBufferingSubscriber extends BaseSubscriberAdapter<ByteBuffer,ByteBuffer>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DelegatingBufferingSubscriber.Builder
-
Field Summary
-
Fields inherited from class software.amazon.awssdk.utils.async.BaseSubscriberAdapter
downstreamDemand, handlingStateUpdate, onCompleteCalledByUpstream, onErrorFromUpstream, terminalCallMadeDownstream, upstreamDemand, upstreamSubscription
-
Fields inherited from class software.amazon.awssdk.utils.async.DelegatingSubscriber
subscriber
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DelegatingBufferingSubscriber(Long maximumBufferInBytes, org.reactivestreams.Subscriber<? super ByteBuffer> delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DelegatingBufferingSubscriber.Builder
builder()
protected void
fulfillDownstreamDemand()
This method is called when demand from the downstream subscriber needs to be fulfilled.void
onSubscribe(org.reactivestreams.Subscription subscription)
-
Methods inherited from class software.amazon.awssdk.utils.async.BaseSubscriberAdapter
handleStateUpdate, onComplete, onError, onNext
-
-
-
-
Constructor Detail
-
DelegatingBufferingSubscriber
protected DelegatingBufferingSubscriber(Long maximumBufferInBytes, org.reactivestreams.Subscriber<? super ByteBuffer> delegate)
-
-
Method Detail
-
onSubscribe
public void onSubscribe(org.reactivestreams.Subscription subscription)
- Specified by:
onSubscribe
in interfaceorg.reactivestreams.Subscriber<ByteBuffer>
- Overrides:
onSubscribe
in classBaseSubscriberAdapter<ByteBuffer,ByteBuffer>
-
fulfillDownstreamDemand
protected void fulfillDownstreamDemand()
Description copied from class:BaseSubscriberAdapter
This method is called when demand from the downstream subscriber needs to be fulfilled. Called in a loop untildownstreamDemand
is no longer needed. Implementations are responsible for decrementing thedownstreamDemand
accordingly as demand gets fulfilled.- Specified by:
fulfillDownstreamDemand
in classBaseSubscriberAdapter<ByteBuffer,ByteBuffer>
-
builder
public static DelegatingBufferingSubscriber.Builder builder()
-
-