Class EmittingSubscription<T>

java.lang.Object
software.amazon.awssdk.core.internal.async.EmittingSubscription<T>
Type Parameters:
T - the type of object to emit to the subscriber.
All Implemented Interfaces:
org.reactivestreams.Subscription

@SdkInternalApi @ThreadSafe public final class EmittingSubscription<T> extends Object implements org.reactivestreams.Subscription
Subscription which can emit
invalid reference
Subscriber#onNext(T)
signals to a subscriber, based on the demand received with the Subscription.request(long). It tracks the outstandingDemand that has not yet been fulfilled and used a Supplier passed to it to create the object it needs to emit.
  • Method Details

    • builder

      public static <T> EmittingSubscription.Builder<T> builder()
    • request

      public void request(long n)
      Specified by:
      request in interface org.reactivestreams.Subscription
    • cancel

      public void cancel()
      Specified by:
      cancel in interface org.reactivestreams.Subscription