Class 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 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 Detail

      • 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