@Override public void run() { source.subscribe(this); } }
@Override protected void subscribeActual(SingleObserver<? super T> observer) { source.subscribe(observer); } }
@Override public void onComplete() { if (done) { return; } done = true; source.subscribe(new ResumeSingleObserver<T>(this, actual)); }
@Override public void onComplete() { if (done) { return; } done = true; source.subscribe(new ResumeSingleObserver<T>(this, actual)); }
@Override protected void subscribeActual(final SingleObserver<? super T> s) { source.subscribe(new DoOnError(s)); }
@Override protected void subscribeActual(final SingleObserver<? super Boolean> s) { final AtomicInteger count = new AtomicInteger(); final Object[] values = { null, null }; final CompositeDisposable set = new CompositeDisposable(); s.onSubscribe(set); first.subscribe(new InnerObserver<T>(0, set, values, s, count)); second.subscribe(new InnerObserver<T>(1, set, values, s, count)); }
@Override protected void subscribeActual(final SingleObserver<? super Boolean> s) { final AtomicInteger count = new AtomicInteger(); final Object[] values = { null, null }; final CompositeDisposable set = new CompositeDisposable(); s.onSubscribe(set); first.subscribe(new InnerObserver<T>(0, set, values, s, count)); second.subscribe(new InnerObserver<T>(1, set, values, s, count)); }
@Override protected void subscribeActual(CompletableObserver s) { FlatMapCompletableObserver<T> parent = new FlatMapCompletableObserver<T>(s, mapper); s.onSubscribe(parent); source.subscribe(parent); }
@Override protected void subscribeActual(SingleObserver<? super T> s) { SingleSource<? extends T> next; try { next = ObjectHelper.requireNonNull(singleSupplier.call(), "The singleSupplier returned a null SingleSource"); } catch (Throwable e) { Exceptions.throwIfFatal(e); EmptyDisposable.error(e, s); return; } next.subscribe(s); }
@Override protected void subscribeActual(final SingleObserver<? super T> s) { final SequentialDisposable sd = new SequentialDisposable(); s.onSubscribe(sd); source.subscribe(new Delay(sd, s)); }
@Override protected void subscribeActual(SingleObserver<? super T> observer) { TakeUntilMainObserver<T> parent = new TakeUntilMainObserver<T>(observer); observer.onSubscribe(parent); other.subscribe(parent.other); source.subscribe(parent); }
@Override protected void subscribeActual(SingleObserver<? super T> observer) { TakeUntilMainObserver<T> parent = new TakeUntilMainObserver<T>(observer); observer.onSubscribe(parent); other.subscribe(parent.other); source.subscribe(parent); }
@Override protected void subscribeActual(SingleObserver<? super T> observer) { TakeUntilMainObserver<T> parent = new TakeUntilMainObserver<T>(observer); observer.onSubscribe(parent); other.subscribe(parent.other); source.subscribe(parent); }
@Override protected void subscribeActual(SingleObserver<? super R> s) { SingleObserver<? super T> sr; try { sr = ObjectHelper.requireNonNull(onLift.apply(s), "The onLift returned a null SingleObserver"); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); EmptyDisposable.error(ex, s); return; } source.subscribe(sr); }
@Override protected void subscribeActual(SingleObserver<? super R> s) { SingleObserver<? super T> sr; try { sr = ObjectHelper.requireNonNull(onLift.apply(s), "The onLift returned a null SingleObserver"); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); EmptyDisposable.error(ex, s); return; } source.subscribe(sr); }
@Override protected void subscribeActual(final SingleObserver<? super T> s) { final CompositeDisposable set = new CompositeDisposable(); s.onSubscribe(set); final AtomicBoolean once = new AtomicBoolean(); Disposable timer = scheduler.scheduleDirect(new TimeoutDispose(once, set, s), timeout, unit); set.add(timer); source.subscribe(new TimeoutObserver(once, set, s)); }
@Override protected void subscribeActual(final SingleObserver<? super T> s) { final CompositeDisposable set = new CompositeDisposable(); s.onSubscribe(set); final AtomicBoolean once = new AtomicBoolean(); Disposable timer = scheduler.scheduleDirect(new TimeoutDispose(once, set, s), timeout, unit); set.add(timer); source.subscribe(new TimeoutObserver(once, set, s)); }
@Override public void onSuccess(T value) { SingleSource<? extends R> ss; try { ss = ObjectHelper.requireNonNull(mapper.apply(value), "The mapper returned a null SingleSource"); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); onError(ex); return; } ss.subscribe(new FlatMapSingleObserver<R>(this, actual)); }
@Override public void onError(Throwable e) { SingleSource<? extends T> source; try { source = ObjectHelper.requireNonNull(nextFunction.apply(e), "The nextFunction returned a null SingleSource."); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); actual.onError(new CompositeException(e, ex)); return; } source.subscribe(new ResumeSingleObserver<T>(this, actual)); }
@Override public void onError(Throwable e) { SingleSource<? extends T> source; try { source = ObjectHelper.requireNonNull(nextFunction.apply(e), "The nextFunction returned a null SingleSource."); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); actual.onError(new CompositeException(e, ex)); return; } source.subscribe(new ResumeSingleObserver<T>(this, actual)); }