Enum Class EmptyComponent

java.lang.Object
java.lang.Enum<EmptyComponent>
io.reactivex.rxjava3.internal.util.EmptyComponent
All Implemented Interfaces:
CompletableObserver, FlowableSubscriber<Object>, MaybeObserver<Object>, Observer<Object>, SingleObserver<Object>, Disposable, Serializable, Comparable<EmptyComponent>, Constable, org.reactivestreams.Subscriber<Object>, org.reactivestreams.Subscription

public enum EmptyComponent extends Enum<EmptyComponent> implements FlowableSubscriber<Object>, Observer<Object>, MaybeObserver<Object>, SingleObserver<Object>, CompletableObserver, org.reactivestreams.Subscription, Disposable
Singleton implementing many interfaces as empty.
  • Enum Constant Details

  • Constructor Details

    • EmptyComponent

      private EmptyComponent()
  • Method Details

    • values

      public static EmptyComponent[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static EmptyComponent valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • asSubscriber

      public static <T> org.reactivestreams.Subscriber<T> asSubscriber()
    • asObserver

      public static <T> Observer<T> asObserver()
    • 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
    • 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
    • onSubscribe

      public void onSubscribe(Disposable d)
      Description copied from interface: Observer
      Provides the Observer with the means of cancelling (disposing) the connection (channel) with the Observable in both synchronous (from within Observer.onNext(Object)) and asynchronous manner.
      Specified by:
      onSubscribe in interface CompletableObserver
      Specified by:
      onSubscribe in interface MaybeObserver<Object>
      Specified by:
      onSubscribe in interface Observer<Object>
      Specified by:
      onSubscribe in interface SingleObserver<Object>
      Parameters:
      d - the Disposable instance whose Disposable.dispose() can be called anytime to cancel the connection
    • onSubscribe

      public void onSubscribe(org.reactivestreams.Subscription s)
      Description copied from interface: FlowableSubscriber
      Implementors of this method should make sure everything that needs to be visible in Subscriber.onNext(Object) is established before calling Subscription.request(long). In practice this means no initialization should happen after the request() call and additional behavior is thread safe in respect to onNext.
      Specified by:
      onSubscribe in interface FlowableSubscriber<Object>
      Specified by:
      onSubscribe in interface org.reactivestreams.Subscriber<Object>
    • onNext

      public void onNext(Object t)
      Description copied from interface: Observer
      Provides the Observer with a new item to observe.

      The Observable may call this method 0 or more times.

      The Observable will not call this method again after it calls either Observer.onComplete() or Observer.onError(Throwable).

      Specified by:
      onNext in interface Observer<Object>
      Specified by:
      onNext in interface org.reactivestreams.Subscriber<Object>
      Parameters:
      t - the item emitted by the Observable
    • onError

      public void onError(Throwable t)
      Description copied from interface: Observer
      Notifies the Observer that the Observable has experienced an error condition.

      If the Observable calls this method, it will not thereafter call Observer.onNext(T) or Observer.onComplete().

      Specified by:
      onError in interface CompletableObserver
      Specified by:
      onError in interface MaybeObserver<Object>
      Specified by:
      onError in interface Observer<Object>
      Specified by:
      onError in interface SingleObserver<Object>
      Specified by:
      onError in interface org.reactivestreams.Subscriber<Object>
      Parameters:
      t - the exception encountered by the Observable
    • onComplete

      public void onComplete()
      Description copied from interface: Observer
      Notifies the Observer that the Observable has finished sending push-based notifications.

      The Observable will not call this method if it calls Observer.onError(Throwable).

      Specified by:
      onComplete in interface CompletableObserver
      Specified by:
      onComplete in interface MaybeObserver<Object>
      Specified by:
      onComplete in interface Observer<Object>
      Specified by:
      onComplete in interface org.reactivestreams.Subscriber<Object>
    • onSuccess

      public void onSuccess(Object value)
      Description copied from interface: MaybeObserver
      Notifies the MaybeObserver with one item and that the Maybe has finished sending push-based notifications.

      The Maybe will not call this method if it calls MaybeObserver.onError(Throwable).

      Specified by:
      onSuccess in interface MaybeObserver<Object>
      Specified by:
      onSuccess in interface SingleObserver<Object>
      Parameters:
      value - the item emitted by the Maybe