public final class ScheduledAction extends Objectimplements Runnable , Subscription
Runnable that executes an
Action0 and can be cancelled. The analog is the
Subscriber in respect of an
Observer.
| Constructor and Description |
|---|
ScheduledAction(Action0
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Subscription
|
void |
addParent(CompositeSubscription
Adds a parent
CompositeSubscription to this
ScheduledAction so when the action is cancelled or terminates, it can remove itself from this parent.
|
boolean |
isUnsubscribed()
Indicates whether this
Subscription is currently unsubscribed.
|
void |
run()
|
void |
unsubscribe()
Stops the receipt of notifications on the
Subscriber that was registered when this Subscription was received.
|
public ScheduledAction(Action0action)
public void run()
public boolean isUnsubscribed()
Subscription
Subscription is currently unsubscribed.
isUnsubscribed in interface
Subscription
true if this
Subscription is currently unsubscribed,
false otherwise
public 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).
public void add(Subscriptions)
s -
public void addParent(CompositeSubscriptionparent)
CompositeSubscription to this
ScheduledAction so when the action is cancelled or terminates, it can remove itself from this parent.
parent - the parent
CompositeSubscription to add