T - public abstract class Subscriber<T> extends java.lang.Object implements Observer<T>, Subscription
After an Observer calls an Observable's Observable.subscribe method, the Observable calls the
Observer's onNext method to provide notifications. A well-behaved Observable will call an Observer's
onCompleted closure exactly once or the Observer's onError closure exactly once.
For more information see the RxJava Wiki
| Modifier | Constructor and Description |
|---|---|
protected |
Subscriber() |
protected |
Subscriber(CompositeSubscription cs) |
protected |
Subscriber(Subscriber<?> op) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Subscription s)
Used to register an unsubscribe callback.
|
boolean |
isUnsubscribed() |
void |
unsubscribe()
Stop receiving notifications on the
Subscriber that was registered when this Subscription was received. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonCompleted, onError, onNextprotected Subscriber(CompositeSubscription cs)
protected Subscriber()
protected Subscriber(Subscriber<?> op)
public final void add(Subscription s)
public final void unsubscribe()
SubscriptionSubscriber that was registered when this Subscription was received.
This allows unregistering an Subscriber before it has finished receiving all events (ie. before onCompleted is called).
unsubscribe in interface Subscriptionpublic final boolean isUnsubscribed()
isUnsubscribed in interface Subscription