Class PublishSubject.PublishDisposable<T>

  • Type Parameters:
    T - the value type
    All Implemented Interfaces:
    Disposable, java.io.Serializable
    Enclosing class:
    PublishSubject<T>

    static final class PublishSubject.PublishDisposable<T>
    extends java.util.concurrent.atomic.AtomicBoolean
    implements Disposable
    Wraps the actual subscriber, tracks its requests and makes cancellation to remove itself from the current subscribers array.
    • Constructor Summary

      Constructors 
      Constructor Description
      PublishDisposable​(Observer<? super T> actual, PublishSubject<T> parent)
      Constructs a PublishSubscriber, wraps the actual subscriber and the state.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose()
      Dispose the resource, the operation should be idempotent.
      boolean isDisposed()
      Returns true if this resource has been disposed.
      void onComplete()  
      void onError​(java.lang.Throwable t)  
      void onNext​(T t)  
      • Methods inherited from class java.util.concurrent.atomic.AtomicBoolean

        compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, get, getAcquire, getAndSet, getOpaque, getPlain, lazySet, set, setOpaque, setPlain, setRelease, toString, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
      • Methods inherited from class java.lang.Object

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

      • PublishDisposable

        PublishDisposable​(Observer<? super T> actual,
                          PublishSubject<T> parent)
        Constructs a PublishSubscriber, wraps the actual subscriber and the state.
        Parameters:
        actual - the actual subscriber
        parent - the parent PublishProcessor
    • Method Detail

      • onNext

        public void onNext​(T t)
      • onError

        public void onError​(java.lang.Throwable t)
      • onComplete

        public void onComplete()
      • dispose

        public void dispose()
        Description copied from interface: Disposable
        Dispose the resource, the operation should be idempotent.
        Specified by:
        dispose in interface Disposable
      • isDisposed

        public boolean isDisposed()
        Description copied from interface: Disposable
        Returns true if this resource has been disposed.
        Specified by:
        isDisposed in interface Disposable
        Returns:
        true if this resource has been disposed