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>
@SdkProtectedApi public class DelegatingBufferingSubscriber extends BaseSubscriberAdapter<ByteBuffer,ByteBuffer>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDelegatingBufferingSubscriber.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 protectedDelegatingBufferingSubscriber(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.Builderbuilder()protected voidfulfillDownstreamDemand()This method is called when demand from the downstream subscriber needs to be fulfilled.voidonSubscribe(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:
onSubscribein interfaceorg.reactivestreams.Subscriber<ByteBuffer>- Overrides:
onSubscribein classBaseSubscriberAdapter<ByteBuffer,ByteBuffer>
-
fulfillDownstreamDemand
protected void fulfillDownstreamDemand()
Description copied from class:BaseSubscriberAdapterThis method is called when demand from the downstream subscriber needs to be fulfilled. Called in a loop untildownstreamDemandis no longer needed. Implementations are responsible for decrementing thedownstreamDemandaccordingly as demand gets fulfilled.- Specified by:
fulfillDownstreamDemandin classBaseSubscriberAdapter<ByteBuffer,ByteBuffer>
-
builder
public static DelegatingBufferingSubscriber.Builder builder()
-
-