@Override protected void subscribeActual(MaybeObserver<? super T> observer) { boolean b; try { b = condition.getAsBoolean(); } catch (Throwable ex) { EmptyDisposable.error(ex, observer); return; } if (b) { then.subscribe(observer); } else { orElse.subscribe(observer); } }
@Override protected void subscribeActual(@NonNull SingleObserver<? super T> observer) { boolean b; try { b = condition.getAsBoolean(); } catch (Throwable ex) { EmptyDisposable.error(ex, observer); return; } if (b) { then.subscribe(observer); } else { orElse.subscribe(observer); } }
@Override protected void subscribeActual(CompletableObserver observer) { boolean b; try { b = condition.getAsBoolean(); } catch (Throwable ex) { EmptyDisposable.error(ex, observer); return; } if (b) { then.subscribe(observer); } else { orElse.subscribe(observer); } }
@Override protected void subscribeActual(MaybeObserver<? super T> observer) { K key; MaybeSource<? extends T> source; try { key = caseSelector.call(); source = mapOfCases.get(key); } catch (Throwable ex) { EmptyDisposable.error(ex, observer); return; } if (source == null) { source = defaultCase; } source.subscribe(observer); }
@Override protected void subscribeActual(@NonNull SingleObserver<? super T> observer) { K key; SingleSource<? extends T> source; try { key = caseSelector.call(); source = mapOfCases.get(key); } catch (Throwable ex) { EmptyDisposable.error(ex, observer); return; } if (source == null) { source = defaultCase; } source.subscribe(observer); }
@Override protected void subscribeActual(Observer<? super T> observer) { K key; ObservableSource<? extends T> source; try { key = caseSelector.call(); source = mapOfCases.get(key); } catch (Throwable ex) { EmptyDisposable.error(ex, observer); return; } if (source == null) { source = defaultCase; } source.subscribe(observer); }
@Override protected void subscribeActual(CompletableObserver observer) { K key; CompletableSource source; try { key = caseSelector.call(); source = mapOfCases.get(key); } catch (Throwable ex) { EmptyDisposable.error(ex, observer); return; } if (source == null) { source = defaultCase; } source.subscribe(observer); }
@Override protected void subscribeActual(Observer<? super T> observer) { boolean b; try { b = condition.getAsBoolean(); } catch (Throwable ex) { EmptyDisposable.error(ex, observer); return; } if (b) { then.subscribe(observer); } else { orElse.subscribe(observer); } }
@Override protected void subscribeActual(SingleObserver<? super Container> observer) { observer.onSubscribe(EmptyDisposable.INSTANCE); try { Container v = run(); if (v != null) { observer.onSuccess(v); } else { observer.onError(new NullPointerException("The callable returned a null value")); } } catch (Throwable e) { Exceptions.throwIfFatal(e); observer.onError(e); } }
@Override protected void subscribeActual(Observer<? super T> observer) { K key; ObservableSource<? extends T> source; try { key = caseSelector.call(); source = mapOfCases.get(key); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); EmptyDisposable.error(ex, observer); return; } if (source == null) { source = defaultCase; } source.subscribe(observer); }
@Override protected void subscribeActual(Observer<? super T> observer) { boolean b; try { b = condition.getAsBoolean(); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); EmptyDisposable.error(ex, observer); return; } if (b) { then.subscribe(observer); } else { orElse.subscribe(observer); } }
@Override public Disposable schedule(Runnable task) { WorkerRunnable wr = new WorkerRunnable(task, this); synchronized (this) { HashSet<WorkerRunnable> set = tasks; if (set == null) { return EmptyDisposable.INSTANCE; } set.add(wr); } actor.tell(wr, ActorRef.noSender()); return wr; }
@Override public Disposable schedule(Runnable run) { WorkerTask wt = new WorkerTask(RxSwingPlugins.onSchedule(run)); if (add(wt)) { EventQueue.invokeLater(wt); return wt; } return EmptyDisposable.INSTANCE; }
@Override public Disposable schedule(Runnable run, long delay, TimeUnit unit) { WorkerTimedTask wtt = new WorkerTimedTask( RxSwingPlugins.onSchedule(run), (int)unit.toMillis(delay), (int)Math.max(0, unit.toMillis(delay)), false ); if (add(wtt)) { wtt.start(); return wtt; } return EmptyDisposable.INSTANCE; }
@Override public Disposable schedulePeriodically(Runnable run, long initialDelay, long period, TimeUnit unit) { WorkerTimedTask wtt = new WorkerTimedTask( RxSwingPlugins.onSchedule(run), (int)unit.toMillis(initialDelay), (int)Math.max(0, unit.toMillis(period)), true ); if (add(wtt)) { wtt.start(); return wtt; } return EmptyDisposable.INSTANCE; }
@Override protected void subscribeActual(MaybeObserver<? super Container> observer) { observer.onSubscribe(EmptyDisposable.INSTANCE); try { Container v = run(); observer.onSuccess(v); } catch (Throwable e) { Exceptions.throwIfFatal(e); observer.onError(e); } }