RxJava



rx.subscriptions
Class Subscriptions

java.lang.Object
  extended by rx.subscriptions.Subscriptions

public class Subscriptions
extends java.lang.Object

Helper methods and utilities for creating and working with Subscription objects


Constructor Summary
Subscriptions()
           
 
Method Summary
static Subscription create(Action0 unsubscribe)
          A Subscription which invokes the given Action0 when unsubscribed.
static Subscription create(java.util.concurrent.Future<?> f)
          Deprecated. Use Subscriptions.from(Future) instead
static CompositeSubscription create(Subscription... subscriptions)
          Deprecated. Use Subscriptions.from(Subscription...) instead
static Subscription empty()
          A Subscription that does nothing.
static Subscription from(java.util.concurrent.Future<?> f)
          A Subscription that wraps a Future and cancels it when unsubscribed.
static CompositeSubscription from(Subscription... subscriptions)
          A Subscription that groups multiple Subscriptions together and unsubscribes from all of them together.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Subscriptions

public Subscriptions()
Method Detail

empty

public static Subscription empty()
A Subscription that does nothing.

Returns:
Subscription

create

public static Subscription create(Action0 unsubscribe)
A Subscription which invokes the given Action0 when unsubscribed.

Parameters:
unsubscribe - Action to invoke on unsubscribe.
Returns:
Subscription

from

public static Subscription from(java.util.concurrent.Future<?> f)
A Subscription that wraps a Future and cancels it when unsubscribed.

Parameters:
f - Future
Returns:
Subscription

create

public static Subscription create(java.util.concurrent.Future<?> f)
Deprecated. Use Subscriptions.from(Future) instead

A Subscription that wraps a Future and cancels it when unsubscribed.

Parameters:
f - Future
Returns:
Subscription

from

public static CompositeSubscription from(Subscription... subscriptions)
A Subscription that groups multiple Subscriptions together and unsubscribes from all of them together.

Parameters:
subscriptions - Subscriptions to group together
Returns:
Subscription

create

public static CompositeSubscription create(Subscription... subscriptions)
Deprecated. Use Subscriptions.from(Subscription...) instead

A Subscription that groups multiple Subscriptions together and unsubscribes from all of them together.

Parameters:
subscriptions - Subscriptions to group together
Returns:
Subscription