Top Description Fields Constructors Methods
rx.subscriptions

public final Class SerialSubscription

extends Object
implements Subscription
Class Inheritance
All Implemented Interfaces
rx.Subscription
Imports
rx.Subscription, rx.internal.subscriptions.SequentialSubscription

Represents a subscription whose underlying subscription can be swapped for another subscription which causes the previous underlying subscription to be unsubscribed.

Field Summary

Modifier and TypeField and Description
pack-priv final SequentialSubscription

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Subscription

Returns:

the Subscription that underlies the MultipleAssignmentSubscription
get
()

Gets the underlying subscription.

public boolean
isUnsubscribed()

Implements rx.Subscription.isUnsubscribed.

Indicates whether this Subscription is currently unsubscribed.
public void
set(Subscription
the Subscription to set
s
)

Sets the underlying subscription.

public void
unsubscribe()

Implements rx.Subscription.unsubscribe.

Stops the receipt of notifications on the Subscriber that was registered when this Subscription was received.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

stateback to summary
pack-priv final SequentialSubscription state

Constructor Detail

SerialSubscriptionback to summary
public SerialSubscription()

Method Detail

getback to summary
public Subscription get()

Gets the underlying subscription.

Returns:Subscription

the Subscription that underlies the MultipleAssignmentSubscription

isUnsubscribedback to summary
public boolean isUnsubscribed()

Implements rx.Subscription.isUnsubscribed.

Doc from rx.Subscription.isUnsubscribed.

Indicates whether this Subscription is currently unsubscribed.

Returns:boolean

true if this Subscription is currently unsubscribed, false otherwise

Annotations
@Override
setback to summary
public void set(Subscription s)

Sets the underlying subscription. If the MultipleAssignmentSubscription is already unsubscribed, setting a new subscription causes the new subscription to also be immediately unsubscribed.

Parameters
s:Subscription

the Subscription to set

Exceptions
IllegalArgumentException:
if s is null
unsubscribeback to summary
public void unsubscribe()

Implements rx.Subscription.unsubscribe.

Doc from rx.Subscription.unsubscribe.

Stops the receipt of notifications on the Subscriber 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).

Annotations
@Override