Enum EmptyComponent
- java.lang.Object
-
- java.lang.Enum<EmptyComponent>
-
- io.reactivex.rxjava3.internal.util.EmptyComponent
-
- All Implemented Interfaces:
CompletableObserver,FlowableSubscriber<java.lang.Object>,MaybeObserver<java.lang.Object>,Observer<java.lang.Object>,SingleObserver<java.lang.Object>,Disposable,java.io.Serializable,java.lang.Comparable<EmptyComponent>,org.reactivestreams.Subscriber<java.lang.Object>,org.reactivestreams.Subscription
public enum EmptyComponent extends java.lang.Enum<EmptyComponent> implements FlowableSubscriber<java.lang.Object>, Observer<java.lang.Object>, MaybeObserver<java.lang.Object>, SingleObserver<java.lang.Object>, CompletableObserver, org.reactivestreams.Subscription, Disposable
Singleton implementing many interfaces as empty.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description privateEmptyComponent()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> Observer<T>asObserver()static <T> org.reactivestreams.Subscriber<T>asSubscriber()voidcancel()voiddispose()Dispose the resource, the operation should be idempotent.booleanisDisposed()Returns true if this resource has been disposed.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.voidonSubscribe(org.reactivestreams.Subscription s)Implementors of this method should make sure everything that needs to be visible inSubscriber.onNext(Object)is established before callingSubscription.request(long).voidonSuccess(java.lang.Object value)Notifies theMaybeObserverwith one item and that theMaybehas finished sending push-based notifications.voidrequest(long n)static EmptyComponentvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static EmptyComponent[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final EmptyComponent INSTANCE
-
-
Method Detail
-
values
public static EmptyComponent[] 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 (EmptyComponent c : EmptyComponent.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EmptyComponent 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
-
asSubscriber
public static <T> org.reactivestreams.Subscriber<T> asSubscriber()
-
asObserver
public static <T> Observer<T> asObserver()
-
dispose
public void dispose()
Description copied from interface:DisposableDispose the resource, the operation should be idempotent.- Specified by:
disposein interfaceDisposable
-
isDisposed
public boolean isDisposed()
Description copied from interface:DisposableReturns true if this resource has been disposed.- Specified by:
isDisposedin interfaceDisposable- Returns:
- true if this resource has been disposed
-
request
public void request(long n)
- Specified by:
requestin interfaceorg.reactivestreams.Subscription
-
cancel
public void cancel()
- Specified by:
cancelin interfaceorg.reactivestreams.Subscription
-
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 interfaceCompletableObserver- Specified by:
onSubscribein interfaceMaybeObserver<java.lang.Object>- Specified by:
onSubscribein interfaceObserver<java.lang.Object>- Specified by:
onSubscribein interfaceSingleObserver<java.lang.Object>- Parameters:
d- theDisposableinstance whoseDisposable.dispose()can be called anytime to cancel the connection
-
onSubscribe
public void onSubscribe(org.reactivestreams.Subscription s)
Description copied from interface:FlowableSubscriberImplementors of this method should make sure everything that needs to be visible inSubscriber.onNext(Object)is established before callingSubscription.request(long). In practice this means no initialization should happen after therequest()call and additional behavior is thread safe in respect toonNext.- Specified by:
onSubscribein interfaceFlowableSubscriber<java.lang.Object>- Specified by:
onSubscribein interfaceorg.reactivestreams.Subscriber<java.lang.Object>
-
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().- Specified by:
onErrorin interfaceCompletableObserver- Specified by:
onErrorin interfaceMaybeObserver<java.lang.Object>- Specified by:
onErrorin interfaceObserver<java.lang.Object>- Specified by:
onErrorin interfaceSingleObserver<java.lang.Object>- Specified by:
onErrorin interfaceorg.reactivestreams.Subscriber<java.lang.Object>- Parameters:
t- the exception encountered by the Observable
-
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 interfaceCompletableObserver- Specified by:
onCompletein interfaceMaybeObserver<java.lang.Object>- Specified by:
onCompletein interfaceObserver<java.lang.Object>- Specified by:
onCompletein interfaceorg.reactivestreams.Subscriber<java.lang.Object>
-
onSuccess
public void onSuccess(java.lang.Object value)
Description copied from interface:MaybeObserverNotifies theMaybeObserverwith one item and that theMaybehas finished sending push-based notifications.The
Maybewill not call this method if it callsMaybeObserver.onError(java.lang.Throwable).- Specified by:
onSuccessin interfaceMaybeObserver<java.lang.Object>- Specified by:
onSuccessin interfaceSingleObserver<java.lang.Object>- Parameters:
value- the item emitted by theMaybe
-
-