Download presentation
Presentation is loading. Please wait.
Published byÁἌλκιμος Δασκαλοπούλου Modified over 6 years ago
1
Advanced Topics in Concurrency and Reactive Programming
Majeed Kassis
2
The Marble Diagram This style of diagram is useful to illustrate the behavior we wish to achieve using ReactiveX. See
3
Map Operation
4
Map Example
5
Filter Operation
6
Filter Example
7
Merge Operation
8
Merge Example 1 2 3 4 5 6 7 8 9 private void mergeExample() {
final String[] aStrings = {"A1", "A2", "A3", "A4"}; final String[] bStrings = {"B1", "B2", "B3"}; final Observable<String> aObservable = Observable.fromArray(aStrings); final Observable<String> bObservable = Observable.fromArray(bStrings); Observable.merge(aObservable, bObservable) .subscribe(getObserver()); }
9
Combining via Zip
10
Error Handling: onErrorResumeNext
The onErrorResumeNext method returns an Observable that mirrors the behavior of the source Observable, unless that Observable invokes onError in which case, rather than propagating that error to the observer, onErrorResumeNext will instead begin mirroring a second, backup Observable.
11
Error Handling: onErrorReturn
12
OnErrorReturn (something) Example
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.