public enum EmptyComponent extends Enum<EmptyComponent> implements FlowableSubscriber<Object>, Observer<Object>, MaybeObserver<Object>, SingleObserver<Object>, CompletableObserver, org.reactivestreams.Subscription, Disposable
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
static <T> Observer<T> |
asObserver() |
static <T> org.reactivestreams.Subscriber<T> |
asSubscriber() |
void |
cancel() |
void |
dispose()
Dispose the resource, the operation should be idempotent.
|
boolean |
isDisposed()
Returns true if this resource has been disposed.
|
void |
onComplete()
Notifies the Observer that the
Observable has finished sending push-based notifications. |
void |
onError(Throwable t)
Notifies the Observer that the
Observable has experienced an error condition. |
void |
onNext(Object t)
Provides the Observer with a new item to observe.
|
void |
onSubscribe(Disposable d)
Provides the Observer with the means of cancelling (disposing) the
connection (channel) with the Observable in both
synchronous (from within
Observer.onNext(Object) ) and asynchronous manner. |
void |
onSubscribe(org.reactivestreams.Subscription s)
Implementors of this method should make sure everything that needs
to be visible in
Subscriber.onNext(Object) is established before
calling Subscription.request(long) . |
void |
onSuccess(Object value)
Notifies the MaybeObserver with one item and that the
Maybe has finished sending
push-based notifications. |
void |
request(long n) |
static EmptyComponent |
valueOf(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.
|
public static final EmptyComponent INSTANCE
public static EmptyComponent[] values()
for (EmptyComponent c : EmptyComponent.values()) System.out.println(c);
public static EmptyComponent valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static <T> org.reactivestreams.Subscriber<T> asSubscriber()
public static <T> Observer<T> asObserver()
public void dispose()
Disposable
dispose
in interface Disposable
public boolean isDisposed()
Disposable
isDisposed
in interface Disposable
public void request(long n)
request
in interface org.reactivestreams.Subscription
public void cancel()
cancel
in interface org.reactivestreams.Subscription
public void onSubscribe(Disposable d)
Observer
Observer.onNext(Object)
) and asynchronous manner.onSubscribe
in interface CompletableObserver
onSubscribe
in interface MaybeObserver<Object>
onSubscribe
in interface Observer<Object>
onSubscribe
in interface SingleObserver<Object>
d
- the Disposable instance whose Disposable.dispose()
can
be called anytime to cancel the connectionpublic void onSubscribe(org.reactivestreams.Subscription s)
FlowableSubscriber
Subscriber.onNext(Object)
is established before
calling Subscription.request(long)
. In practice this means
no initialization should happen after the request()
call and
additional behavior is thread safe in respect to onNext
.
onSubscribe
in interface FlowableSubscriber<Object>
onSubscribe
in interface org.reactivestreams.Subscriber<Object>
public void onNext(Object t)
Observer
The Observable
may call this method 0 or more times.
The Observable
will not call this method again after it calls either Observer.onComplete()
or
Observer.onError(java.lang.Throwable)
.
public void onError(Throwable t)
Observer
Observable
has experienced an error condition.
If the Observable
calls this method, it will not thereafter call Observer.onNext(T)
or
Observer.onComplete()
.
onError
in interface CompletableObserver
onError
in interface MaybeObserver<Object>
onError
in interface Observer<Object>
onError
in interface SingleObserver<Object>
onError
in interface org.reactivestreams.Subscriber<Object>
t
- the exception encountered by the Observablepublic void onComplete()
Observer
Observable
has finished sending push-based notifications.
The Observable
will not call this method if it calls Observer.onError(java.lang.Throwable)
.
onComplete
in interface CompletableObserver
onComplete
in interface MaybeObserver<Object>
onComplete
in interface Observer<Object>
onComplete
in interface org.reactivestreams.Subscriber<Object>
public void onSuccess(Object value)
MaybeObserver
Maybe
has finished sending
push-based notifications.
The Maybe
will not call this method if it calls MaybeObserver.onError(java.lang.Throwable)
.
onSuccess
in interface MaybeObserver<Object>
onSuccess
in interface SingleObserver<Object>
value
- the item emitted by the MaybeCopyright © 2019. All rights reserved.