Before we do anything else, we need to study how an Observable sequentially passes items down the chain to an Observer. At the highest level, an Observable works by passing three types of events:
- onNext(): This passes each item one at a time from the source Observable all the way down to the Observer.
- onComplete(): This communicates a completion event all the way down to the Observer, indicating that no more onNext() calls will occur.
- onError(): This communicates an error down the chain to the Observer, which typically defines how to handle it. Unless a retry() operator is used to intercept the error, the Observable chain typically terminates, and no more emissions occur.
These three events are initiated by the ...