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 private
EmptyObserver()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onComplete()
Notifies theObserver
that theObservable
has finished sending push-based notifications.void
onError(java.lang.Throwable t)
Notifies theObserver
that theObservable
has experienced an error condition.void
onNext(java.lang.Object t)
Provides theObserver
with a new item to observe.void
onSubscribe(Disposable d)
Provides theObserver
with the means of cancelling (disposing) the connection (channel) with theObservable
in both synchronous (from withinObserver.onNext(Object)
) and asynchronous manner.static TestObserver.EmptyObserver
valueOf(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:Observer
Provides theObserver
with the means of cancelling (disposing) the connection (channel) with theObservable
in both synchronous (from withinObserver.onNext(Object)
) and asynchronous manner.- Specified by:
onSubscribe
in interfaceObserver<java.lang.Object>
- Parameters:
d
- theDisposable
instance whoseDisposable.dispose()
can be called anytime to cancel the connection
-
onNext
public void onNext(java.lang.Object t)
Description copied from interface:Observer
Provides theObserver
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 eitherObserver.onComplete()
orObserver.onError(java.lang.Throwable)
.
-
onError
public void onError(java.lang.Throwable t)
Description copied from interface:Observer
Notifies theObserver
that theObservable
has experienced an error condition.If the
Observable
calls this method, it will not thereafter callObserver.onNext(T)
orObserver.onComplete()
.
-
onComplete
public void onComplete()
Description copied from interface:Observer
Notifies theObserver
that theObservable
has finished sending push-based notifications.The
Observable
will not call this method if it callsObserver.onError(java.lang.Throwable)
.- Specified by:
onComplete
in interfaceObserver<java.lang.Object>
-
-