Completable

Since Completable can basically process just two types of actions--onComplete and onError--we will cover it very briefly.

Completable has many static factory methods available to create it but, most often, it will just be found as a return value in some other libraries. For example, the Completable can be created by calling the following:

Completable completable = Completable.fromAction(() -> {
log("Let's do something");
});

Then, it is to be subscribed with the following:

completable.subscribe(() -> {
log("Finished");
}, throwable -> {
log(throwable);
});
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.157.34