Skip to content

dzielins42/RxFutures

Repository files navigation

RxFutures

Small library to convert from CompletableFuture to RxJava2.

Release

Usage

  1. Setup with JitPack
  2. Use in code:
val future = CompletableFuture.completedFuture(42)
future.asSingle().subscribe{ theAnswer -> searchQuestion(theAnswer) }

Java

RxFutures is build on kotlin extension functions, in order to use it in Java you need to use RxFuturesKt as follows:

CompletableFuture<Integer> future = CompletableFuture.completedFuture(42);
RxFuturesKt.asSingle(future).subscribe(theAnswer -> searchQuestion(theAnswer));

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages