public final class Subscriptions extends Object
Subscription objects
| Modifier and Type | Method and Description |
|---|---|
static Subscription |
create(Action0
Creates and returns a
Subscription that invokes the given
Action0 when unsubscribed.
|
static Subscription |
empty()
Returns a
Subscription that does nothing.
|
static Subscription |
from(Future
Converts a
Future into a
Subscription and cancels it when unsubscribed.
|
static CompositeSubscription |
from(Subscription
Converts a set of
Subscriptions into a
CompositeSubscription that groups the multiple Subscriptions together and unsubscribes from all of them together.
|
public static Subscriptionempty()
Subscription that does nothing.
Subscription that does nothing
public static Subscriptioncreate(Action0 unsubscribe)
Subscription that invokes the given
Action0 when unsubscribed.
unsubscribe - Action to invoke on unsubscribe.
Subscription
public static Subscriptionfrom(Future <?> f)
Future into a
Subscription and cancels it when unsubscribed.
f - the
Future to convert
Subscription that wraps
f
public static CompositeSubscriptionfrom(Subscription ... subscriptions)
Subscriptions into a
CompositeSubscription that groups the multiple Subscriptions together and unsubscribes from all of them together.
subscriptions - the Subscriptions to group together
CompositeSubscription representing the
subscriptions set