public interface Subscription
Observable.subscribe(Subscriber) to allow unsubscribing.
See the utilities in Subscriptions and the implementations in the rx.subscriptions package.
This interface is the RxJava equivalent of IDisposable in Microsoft's Rx implementation.
| Modifier and Type | Method and Description |
|---|---|
boolean |
isUnsubscribed()
Indicates whether this
Subscription is currently unsubscribed. |
void |
unsubscribe()
Stops the receipt of notifications on the
Subscriber that was registered when this Subscription
was received. |
void unsubscribe()
Subscriber that was registered when this Subscription
was received.
This allows deregistering an Subscriber before it has finished receiving all events (i.e. before
onCompleted is called).
boolean isUnsubscribed()
Subscription is currently unsubscribed.true if this Subscription is currently unsubscribed, false otherwise