RxJava



rx.subscriptions
Class MultipleAssignmentSubscription

java.lang.Object
  extended by rx.subscriptions.MultipleAssignmentSubscription
All Implemented Interfaces:
Subscription

public class MultipleAssignmentSubscription
extends java.lang.Object
implements Subscription

Subscription that can be checked for status such as in a loop inside an Observable to exit the loop if unsubscribed.

See Also:
Rx.Net equivalent MultipleAssignmentDisposable

Constructor Summary
MultipleAssignmentSubscription()
           
 
Method Summary
 Subscription getSubscription()
           
 boolean isUnsubscribed()
           
 void setSubscription(Subscription s)
           
 void unsubscribe()
          Stop receiving notifications on the Observer that was registered when this Subscription was received.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipleAssignmentSubscription

public MultipleAssignmentSubscription()
Method Detail

isUnsubscribed

public boolean isUnsubscribed()

unsubscribe

public void unsubscribe()
Description copied from interface: Subscription
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).

Specified by:
unsubscribe in interface Subscription

setSubscription

public void setSubscription(Subscription s)

getSubscription

public Subscription getSubscription()