Class AbstractSinglePublisher<T>

  • Type Parameters:
    T - the type of items emitted by this Publisher
    All Implemented Interfaces:
    org.reactivestreams.Publisher<T>, org.reactivestreams.Subscription
    Direct Known Subclasses:
    AbstractEventPublisher, AbstractSingleProcessor, QueuedSinglePublisher, StringContent

    public abstract class AbstractSinglePublisher<T>
    extends java.lang.Object
    implements org.reactivestreams.Publisher<T>, org.reactivestreams.Subscription
    A Publisher that supports a single Subscriber.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void cancel()  
      protected static long cappedAdd​(long x, long y)  
      protected boolean isCancelled()  
      protected void onFailure​(org.reactivestreams.Subscriber<? super T> subscriber, java.lang.Throwable failure)  
      protected abstract void onRequest​(org.reactivestreams.Subscriber<? super T> subscriber, long n)  
      void request​(long n)  
      void subscribe​(org.reactivestreams.Subscriber<? super T> subscriber)  
      protected org.reactivestreams.Subscriber<? super T> subscriber()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AbstractSinglePublisher

        public AbstractSinglePublisher()
    • Method Detail

      • cappedAdd

        protected static long cappedAdd​(long x,
                                        long y)
      • subscribe

        public void subscribe​(org.reactivestreams.Subscriber<? super T> subscriber)
        Specified by:
        subscribe in interface org.reactivestreams.Publisher<T>
      • subscriber

        protected org.reactivestreams.Subscriber<? super T> subscriber()
      • request

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

        protected abstract void onRequest​(org.reactivestreams.Subscriber<? super T> subscriber,
                                          long n)
      • onFailure

        protected void onFailure​(org.reactivestreams.Subscriber<? super T> subscriber,
                                 java.lang.Throwable failure)
      • cancel

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

        protected boolean isCancelled()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object