public final class BooleanSubscription extends Objectimplements Subscription
Observable to exit the loop if unsubscribed.
| Constructor and Description |
|---|
BooleanSubscription()
|
| Modifier and Type | Method and Description |
|---|---|
static BooleanSubscription |
create()
Creates a
BooleanSubscription without unsubscribe behavior.
|
static BooleanSubscription |
create(Action0
Creates a
BooleanSubscription with a specified function to invoke upon unsubscribe.
|
boolean |
isUnsubscribed()
Indicates whether this
Subscription is currently unsubscribed.
|
void |
unsubscribe()
Stops the receipt of notifications on the
Subscriber that was registered when this Subscription was received.
|
public static BooleanSubscriptioncreate()
BooleanSubscription without unsubscribe behavior.
BooleanSubscription
public static BooleanSubscriptioncreate(Action0 onUnsubscribe)
BooleanSubscription with a specified function to invoke upon unsubscribe.
onUnsubscribe - an
Action0 to invoke upon unsubscribe
BooleanSubscription
public boolean isUnsubscribed()
Subscription
Subscription is currently unsubscribed.
isUnsubscribed in interface
Subscription
true if this
Subscription is currently unsubscribed,
false otherwise
public final void unsubscribe()
Subscription
Subscriber that was registered when this Subscription was received.
This allows unregistering an Subscriber before it has finished receiving all events (i.e. before onCompleted is called).