@Override public synchronized Observable<AccessToken> registerForAccessTokenUpdates(String code) { Timber.d("registerForAccessTokenUpdates"); if (loadAccessTokenSubscription == null || loadAccessTokenSubscription.isUnsubscribed()) { Timber.d("no loading in progress, starting new one"); loadAccessTokenSubscription = loadAccessTokenObservable(code) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe( new DefaultSubscriber<AccessToken>() { @Override public void onError(Throwable throwable) { Timber.e("accessTokenSubject.onError"); accessTokenSubject.onError(throwable); } @Override public void onNext(AccessToken data) { Timber.d("accessTokenSubject.onNext: " + data); // Caching accessToken data accessToken = data; accessTokenSubject.onNext(accessToken); } }); } return accessTokenSubject.asObservable(); }
public Observable<RouteChange> observeScreenChange() { return screenChangeSubject.asObservable(); }
@Override public final Observable<FragmentEvent> lifecycle() { return lifecycleSubject.asObservable(); }
@Override @NonNull @CheckResult public final Observable<FragmentEvent> lifecycle() { return lifecycleSubject.asObservable(); }
public Observable<LifecycleEvent> lifecycle() { return lifecycleSubject.asObservable(); }
public Observable<FragmentEvent> lifecycle() { return lifecycleSubject.asObservable(); }
@NonNull public Observable<GitHubRepository> getRepository() { return repository.asObservable(); }
public Observable<String> getObservable() { if (mSubject == null) { mSubject = BehaviorSubject.create(get()); } return mSubject.asObservable(); }