Last active
May 9, 2018 19:23
-
-
Save AkshayMoorthy/64dfc8411c22ceae3dbe520a0d14b88b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Flowable<String> f = Flowable.just("Hello"); | |
Disposable d1 = f.subscribeWith(new DisposableSubscriber<String>() { … }); | |
Observable<String> o = Observable.just("Hello"); | |
Disposable d2 = o.subscribeWith(new DisposableObserver<String>() { … }); | |
Maybe<String> m = Maybe.just("Hello"); | |
Disposable d3 = m.subscribeWith(new DisposableMaybeObserver<String>() { … }); | |
Single<String> s = Single.just("Hello"); | |
Disposable d4 = s.subscribeWith(new DisposableSingleObserver<String>() { … }); | |
Completable c = Completable.completed(); | |
Disposable d5 = c.subscribeWith(new DisposableCompletableObserver<String>() { … }); | |
CompositeDisposable a=new CompositeDisposable(); | |
a.add(o.subscribeWith(new DisposableObserver<String>() {…}); | |
a.add(f.subscribeWith(new DisposableSubscriber<String>() {…}); | |
@Override | |
protected void onDestroy() { | |
super.onDestroy(); | |
d.dispose(); | |
s.clear(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment