RxJava



rx
Interface Subscription

All Known Implementing Classes:
BooleanSubscription, CompositeSubscription, SafeObservableSubscription

public interface Subscription

Subscription returns from Observable.subscribe(Observer) to allow unsubscribing.

See utilities in Subscriptions and implementations in the rx.subscriptions package.

This interface is the RxJava equivalent of IDisposable in Microsoft's Rx implementation.


Method Summary
 void unsubscribe()
          Stop receiving notifications on the Observer that was registered when this Subscription was received.
 

Method Detail

unsubscribe

void unsubscribe()
Stop receiving notifications on the Observer that was registered when this Subscription was received.

This allows unregistering an Observer before it has finished receiving all events (ie. before onCompleted is called).