Package io.reactivex.rxjava3.observers
Enum TestObserver.EmptyObserver
- java.lang.Object
-
- java.lang.Enum<TestObserver.EmptyObserver>
-
- io.reactivex.rxjava3.observers.TestObserver.EmptyObserver
-
- All Implemented Interfaces:
Observer<java.lang.Object>,java.io.Serializable,java.lang.Comparable<TestObserver.EmptyObserver>
- Enclosing class:
- TestObserver<T>
static enum TestObserver.EmptyObserver extends java.lang.Enum<TestObserver.EmptyObserver> implements Observer<java.lang.Object>
An observer that ignores all events and does not report errors.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description privateEmptyObserver()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonComplete()Notifies theObserverthat theObservablehas finished sending push-based notifications.voidonError(java.lang.Throwable t)Notifies theObserverthat theObservablehas experienced an error condition.voidonNext(java.lang.Object t)Provides theObserverwith a new item to observe.voidonSubscribe(Disposable d)Provides theObserverwith the means of cancelling (disposing) the connection (channel) with theObservablein both synchronous (from withinObserver.onNext(Object)) and asynchronous manner.static TestObserver.EmptyObservervalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static TestObserver.EmptyObserver[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final TestObserver.EmptyObserver INSTANCE
-
-
Method Detail
-
values
public static TestObserver.EmptyObserver[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TestObserver.EmptyObserver c : TestObserver.EmptyObserver.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TestObserver.EmptyObserver valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
onSubscribe
public void onSubscribe(Disposable d)
Description copied from interface:ObserverProvides theObserverwith the means of cancelling (disposing) the connection (channel) with theObservablein both synchronous (from withinObserver.onNext(Object)) and asynchronous manner.- Specified by:
onSubscribein interfaceObserver<java.lang.Object>- Parameters:
d- theDisposableinstance whoseDisposable.dispose()can be called anytime to cancel the connection
-
onNext
public void onNext(java.lang.Object t)
Description copied from interface:ObserverProvides theObserverwith a new item to observe.The
Observablemay call this method 0 or more times.The
Observablewill not call this method again after it calls eitherObserver.onComplete()orObserver.onError(java.lang.Throwable).
-
onError
public void onError(java.lang.Throwable t)
Description copied from interface:ObserverNotifies theObserverthat theObservablehas experienced an error condition.If the
Observablecalls this method, it will not thereafter callObserver.onNext(T)orObserver.onComplete().
-
onComplete
public void onComplete()
Description copied from interface:ObserverNotifies theObserverthat theObservablehas finished sending push-based notifications.The
Observablewill not call this method if it callsObserver.onError(java.lang.Throwable).- Specified by:
onCompletein interfaceObserver<java.lang.Object>
-
-