Class PublishSubject.PublishDisposable<T>

java.lang.Object
java.util.concurrent.atomic.AtomicBoolean
io.reactivex.rxjava3.subjects.PublishSubject.PublishDisposable<T>
Type Parameters:
T - the value type
All Implemented Interfaces:
Disposable, Serializable
Enclosing class:
PublishSubject<T>

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

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • downstream

      final Observer<? super T> downstream
      The actual subscriber.
    • parent

      final PublishSubject<T> parent
      The subject state.
  • Constructor Details

    • 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 Details

    • onNext

      public void onNext(T t)
    • onError

      public void onError(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