O'Reilly logo

RxJava Essentials by Ivan Morgillo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The RxJava Observer pattern toolkit

In the RxJava world, we have four main players:

  • Observable
  • Observer
  • Subscriber
  • Subjects

Observables and Subjects are the two "producing" entities. Observers and Subscribers are the two "consuming" entities.

Observable

When we have to execute something asynchronously with a lite level of complexity, Java provides classic classes, such as Thread, Future, FutureTask, CompletableFuture, to approach the problem. When the level of complexity goes up, these solutions tend to become messy and hard to maintain. Most of all, they cannot be chained.

RxJava Observables were designed to solve these issues. They are flexible and easy to use, they can be chained, and they can work on a single result routine or, even better, on sequences. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required