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> void
cancel()
void
dispose()
Dispose the resource, the operation should be idempotent.boolean
Returns true if this resource has been disposed.void
Notifies theObserver
that theObservable
has finished sending push-based notifications.void
Notifies theObserver
that theObservable
has experienced an error condition.void
Provides theObserver
with a new item to observe.void
Provides theObserver
with the means of cancelling (disposing) the connection (channel) with theObservable
in both synchronous (from withinObserver.onNext(Object)
) and asynchronous manner.void
onSubscribe
(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)
.void
Notifies theMaybeObserver
with one item and that theMaybe
has finished sending push-based notifications.void
request
(long n) static EmptyComponent
Returns 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:Disposable
Dispose the resource, the operation should be idempotent.- Specified by:
dispose
in interfaceDisposable
-
isDisposed
public boolean isDisposed()Description copied from interface:Disposable
Returns true if this resource has been disposed.- Specified by:
isDisposed
in interfaceDisposable
- Returns:
- true if this resource has been disposed
-
request
public void request(long n) - Specified by:
request
in interfaceorg.reactivestreams.Subscription
-
cancel
public void cancel()- Specified by:
cancel
in interfaceorg.reactivestreams.Subscription
-
onSubscribe
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 interfaceCompletableObserver
- Specified by:
onSubscribe
in interfaceMaybeObserver<Object>
- Specified by:
onSubscribe
in interfaceObserver<Object>
- Specified by:
onSubscribe
in interfaceSingleObserver<Object>
- Parameters:
d
- theDisposable
instance whoseDisposable.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 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:
onSubscribe
in interfaceFlowableSubscriber<Object>
- Specified by:
onSubscribe
in interfaceorg.reactivestreams.Subscriber<Object>
-
onNext
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
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()
.- Specified by:
onError
in interfaceCompletableObserver
- Specified by:
onError
in interfaceMaybeObserver<Object>
- Specified by:
onError
in interfaceObserver<Object>
- Specified by:
onError
in interfaceSingleObserver<Object>
- Specified by:
onError
in interfaceorg.reactivestreams.Subscriber<Object>
- Parameters:
t
- the exception encountered by the Observable
-
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 interfaceCompletableObserver
- Specified by:
onComplete
in interfaceMaybeObserver<Object>
- Specified by:
onComplete
in interfaceObserver<Object>
- Specified by:
onComplete
in interfaceorg.reactivestreams.Subscriber<Object>
-
onSuccess
Description copied from interface:MaybeObserver
Notifies theMaybeObserver
with one item and that theMaybe
has finished sending push-based notifications.The
Maybe
will not call this method if it callsMaybeObserver.onError(java.lang.Throwable)
.- Specified by:
onSuccess
in interfaceMaybeObserver<Object>
- Specified by:
onSuccess
in interfaceSingleObserver<Object>
- Parameters:
value
- the item emitted by theMaybe
-