Package rx.internal.operators
Class OnSubscribeFromAsync.CancellableSubscription
- java.lang.Object
-
- java.util.concurrent.atomic.AtomicReference<AsyncEmitter.Cancellable>
-
- rx.internal.operators.OnSubscribeFromAsync.CancellableSubscription
-
- All Implemented Interfaces:
java.io.Serializable,Subscription
- Enclosing class:
- OnSubscribeFromAsync<T>
static final class OnSubscribeFromAsync.CancellableSubscription extends java.util.concurrent.atomic.AtomicReference<AsyncEmitter.Cancellable> implements Subscription
-
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description CancellableSubscription(AsyncEmitter.Cancellable cancellable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisUnsubscribed()Indicates whether thisSubscriptionis currently unsubscribed.voidunsubscribe()Stops the receipt of notifications on theSubscriberthat was registered when this Subscription was received.-
Methods inherited from class java.util.concurrent.atomic.AtomicReference
accumulateAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, get, getAcquire, getAndAccumulate, getAndSet, getAndUpdate, getOpaque, getPlain, lazySet, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CancellableSubscription
public CancellableSubscription(AsyncEmitter.Cancellable cancellable)
-
-
Method Detail
-
isUnsubscribed
public boolean isUnsubscribed()
Description copied from interface:SubscriptionIndicates whether thisSubscriptionis currently unsubscribed.- Specified by:
isUnsubscribedin interfaceSubscription- Returns:
trueif thisSubscriptionis currently unsubscribed,falseotherwise
-
unsubscribe
public void unsubscribe()
Description copied from interface:SubscriptionStops the receipt of notifications on theSubscriberthat was registered when this Subscription was received.This allows unregistering an
Subscriberbefore it has finished receiving all events (i.e. before onCompleted is called).- Specified by:
unsubscribein interfaceSubscription
-
-