February 2020
Intermediate to advanced
412 pages
9h 36m
English
Completable is simply concerned with an action being executed, but it does not receive any emissions. Logically, it does not have onNext() or onSuccess() to receive emissions, but it does have onError() and onComplete():
interface CompletableObserver<T> { void onSubscribe@NonNull Disposable d); void onComplete(); void onError(@NonNull Throwable error);}
Completable is something you likely will not use often. You can construct one quickly by calling Completable.complete() or Completable.fromRunnable(). The former immediately calls onComplete() without doing anything, while fromRunnable() executes the specified action before calling onComplete():
import io.reactivex.rxjava3.core.Completable;public class Ch2_32 { public static void ...
Read now
Unlock full access