T
- the value typepublic final class ActionSubscriber<T> extends Subscriber<T>
Constructor and Description |
---|
ActionSubscriber(Action1<? super T> onNext,
Action1<Throwable> onError,
Action0 onCompleted) |
Modifier and Type | Method and Description |
---|---|
void |
onCompleted()
Notifies the Observer that the
Observable has finished sending push-based notifications. |
void |
onError(Throwable e)
Notifies the Observer that the
Observable has experienced an error condition. |
void |
onNext(T t)
Provides the Observer with a new item to observe.
|
add, isUnsubscribed, onStart, request, setProducer, unsubscribe
public void onNext(T 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.onCompleted()
or
Observer.onError(java.lang.Throwable)
.
t
- the item emitted by the Observablepublic void onError(Throwable e)
Observer
Observable
has experienced an error condition.
If the Observable
calls this method, it will not thereafter call Observer.onNext(T)
or
Observer.onCompleted()
.
e
- the exception encountered by the Observablepublic void onCompleted()
Observer
Observable
has finished sending push-based notifications.
The Observable
will not call this method if it calls Observer.onError(java.lang.Throwable)
.
Copyright © 2017. All rights reserved.