public final class SerialSubscription extends java.lang.Object implements Subscription
| Constructor and Description |
|---|
SerialSubscription() |
| Modifier and Type | Method and Description |
|---|---|
Subscription |
get()
Gets the underlying subscription.
|
boolean |
isUnsubscribed()
Indicates whether this
Subscription is currently unsubscribed. |
void |
set(Subscription s)
Sets the underlying subscription.
|
void |
unsubscribe()
Stops the receipt of notifications on the
Subscriber that was registered when this Subscription
was received. |
public boolean isUnsubscribed()
SubscriptionSubscription is currently unsubscribed.isUnsubscribed in interface Subscriptiontrue if this Subscription is currently unsubscribed, false otherwisepublic void unsubscribe()
SubscriptionSubscriber 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).
unsubscribe in interface Subscriptionpublic void set(Subscription s)
MultipleAssignmentSubscription is already unsubscribed,
setting a new subscription causes the new subscription to also be immediately unsubscribed.s - the Subscription to setjava.lang.IllegalArgumentException - if s is nullpublic Subscription get()
Subscription that underlies the MultipleAssignmentSubscription