RxJava



rx.operators
Class OperationToObservableFuture

java.lang.Object
  extended by rx.operators.OperationToObservableFuture

public class OperationToObservableFuture
extends java.lang.Object

Converts a Future into an Observable.

You can convert any object that supports the Future interface into an Observable that emits the return value of the get() method of that object, by using the from operation.

This is blocking so the Subscription returned when calling Observable.subscribe(Observer) does nothing.


Constructor Summary
OperationToObservableFuture()
           
 
Method Summary
static
<T> Observable.OnSubscribeFunc<T>
toObservableFuture(java.util.concurrent.Future<? extends T> that)
           
static
<T> Observable.OnSubscribeFunc<T>
toObservableFuture(java.util.concurrent.Future<? extends T> that, long time, java.util.concurrent.TimeUnit unit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationToObservableFuture

public OperationToObservableFuture()
Method Detail

toObservableFuture

public static <T> Observable.OnSubscribeFunc<T> toObservableFuture(java.util.concurrent.Future<? extends T> that)

toObservableFuture

public static <T> Observable.OnSubscribeFunc<T> toObservableFuture(java.util.concurrent.Future<? extends T> that,
                                                                   long time,
                                                                   java.util.concurrent.TimeUnit unit)