June 2017
Intermediate to advanced
400 pages
8h 44m
English
RxJava Observables are much more robust and expressive than Futures, but if you have existing libraries that yield Futures, you can easily turn them into Observables via Observable.future():
import io.reactivex.Observable; import java.util.concurrent.Future; public class Launcher { public static void main(String[] args) { Future<String> futureValue = ...; Observable.fromFuture(futureValue) .map(String::length) .subscribe(System.out::println); } }
Read now
Unlock full access