|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrx.operators.SafeObservableSubscription
public final class SafeObservableSubscription
Thread-safe wrapper around Observable Subscription that ensures unsubscribe can be called only once.
Also used to:
| Constructor Summary | |
|---|---|
SafeObservableSubscription()
|
|
SafeObservableSubscription(Subscription actualSubscription)
|
|
| Method Summary | |
|---|---|
boolean |
isUnsubscribed()
|
void |
unsubscribe()
Stop receiving notifications on the Observer that was registered when this Subscription was received. |
SafeObservableSubscription |
wrap(Subscription actualSubscription)
Wraps the actual subscription once it exists (if it wasn't available when constructed) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SafeObservableSubscription()
public SafeObservableSubscription(Subscription actualSubscription)
| Method Detail |
|---|
public SafeObservableSubscription wrap(Subscription actualSubscription)
actualSubscription - the wrapped subscription
java.lang.IllegalStateException - if trying to set more than once (or use this method after setting via constructor)public void unsubscribe()
SubscriptionObserver 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).
unsubscribe in interface Subscriptionpublic boolean isUnsubscribed()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||