Enum Class 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Observer<T> static <T> org.reactivestreams.Subscriber<T> voidcancel()voiddispose()Dispose the resource, the operation should be idempotent.booleanReturns true if this resource has been disposed.voidNotifies theObserverthat theObservablehas finished sending push-based notifications.voidNotifies theObserverthat theObservablehas experienced an error condition.voidProvides theObserverwith a new item to observe.voidProvides 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).voidNotifies theMaybeObserverwith one item and that theMaybehas finished sending push-based notifications.voidrequest(long n) static EmptyComponentReturns the enum constant of this class with the specified name.static EmptyComponent[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Constructor Details
-
EmptyComponent
private EmptyComponent()
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
asSubscriber
public static <T> org.reactivestreams.Subscriber<T> asSubscriber() -
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
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<Object>- Specified by:
onSubscribein interfaceObserver<Object>- Specified by:
onSubscribein interfaceSingleObserver<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<Object>- Specified by:
onSubscribein interfaceorg.reactivestreams.Subscriber<Object>
-
onNext
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
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<Object>- Specified by:
onErrorin interfaceObserver<Object>- Specified by:
onErrorin interfaceSingleObserver<Object>- Specified by:
onErrorin interfaceorg.reactivestreams.Subscriber<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<Object>- Specified by:
onCompletein interfaceObserver<Object>- Specified by:
onCompletein interfaceorg.reactivestreams.Subscriber<Object>
-
onSuccess
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<Object>- Specified by:
onSuccessin interfaceSingleObserver<Object>- Parameters:
value- the item emitted by theMaybe
-