@Override protected void subscribeActual(Subscriber<? super R> s) { K key; Publisher<? extends R> source; try { key = caseSelector.call(); source = mapOfCases.get(key); } catch (Throwable ex) { EmptySubscription.error(ex, s); return; } if (source == null) { source = defaultCase; } source.subscribe(s); }
@Override protected void subscribeActual(Subscriber<? super T> s) { boolean b; try { b = condition.getAsBoolean(); } catch (Throwable ex) { EmptySubscription.error(ex, s); return; } if (b) { then.subscribe(s); } else { orElse.subscribe(s); } }
@Override protected void subscribeActual(Subscriber<? super R> s) { @SuppressWarnings("unchecked") Perhaps<? extends T>[] srcs = new Perhaps[8]; int n = 0; try { for (Perhaps<? extends T> ph : sources) { if (srcs.length == n) { srcs = Arrays.copyOf(srcs, n + (n >> 1)); } srcs[n++] = ph; } } catch (Throwable ex) { Exceptions.throwIfFatal(ex); EmptySubscription.error(ex, s); return; } ZipCoordinator<T, R> parent = new ZipCoordinator<T, R>(s, zipper, n); s.onSubscribe(parent); parent.subscribe(srcs, n); }
@Override protected void subscribeActual(Subscriber<? super T> s) { K key; Publisher<? extends T> source; try { key = caseSelector.call(); source = mapOfCases.get(key); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); EmptySubscription.error(ex, s); return; } if (source == null) { source = defaultCase; } source.subscribe(s); }
@Override protected void subscribeActual(Subscriber<? super T> s) { boolean b; try { b = condition.getAsBoolean(); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); EmptySubscription.error(ex, s); return; } if (b) { then.subscribe(s); } else { orElse.subscribe(s); } }
@Override protected void subscribeActual(Subscriber<? super T> subscriber) { Iterator<? extends T> it; boolean b; try { it = items.iterator(); b = it.hasNext(); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); EmptySubscription.error(ex, subscriber); return; } if (!b) { EmptySubscription.complete(subscriber); return; } subscriber.onSubscribe(new RFIteratorSubscription<>(subscriber, release, it)); }
@SuppressWarnings("unchecked") @Override protected void subscribeActual(Subscriber<? super T> s) { Publisher<T>[] array = sources; int n; if (array == null) { array = new Publisher[8]; n = 0; try { for (Publisher<T> p : sourcesIterable) { if (n == array.length) { array = Arrays.copyOf(array, n << 1); } array[n++] = ObjectHelper.requireNonNull(p, "a source is null"); } } catch (Throwable ex) { Exceptions.throwIfFatal(ex); EmptySubscription.error(ex, s); return; } } else { n = array.length; } if (n == 0) { EmptySubscription.complete(s); return; } if (n == 1) { array[0].subscribe(s); return; } BasicMergeSubscription<T> parent = new BasicMergeSubscription<T>(s, comparator, n, prefetch, delayErrors); s.onSubscribe(parent); parent.subscribe(array, n); }
public void subscribe(Publisher<T>[] sources, int n) { InnerQueuedSubscriber<T>[] subs = subscribers; for (int i = 0; i < n && !cancelled; i++) { Publisher<T> p = sources[i]; if (p != null) { p.subscribe(subs[i]); } else { EmptySubscription.error(new NullPointerException("The " + i + "th source is null"), subs[i]); if (!delayErrors) { break; } } } }
@Override protected void subscribeActual(Subscriber<? super T> s) { Solo<T> sp; try { sp = ObjectHelper.requireNonNull(supplier.call(), "The supplier returned a null Solo"); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); EmptySubscription.error(ex, s); return; } sp.subscribe(s); }
@Override protected void subscribeActual(Subscriber<? super R> s) { Subscriber<? super T> parent; try { parent = ObjectHelper.requireNonNull(onLift.apply(s), "The onLift returned a null Subscriber"); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); EmptySubscription.error(ex, s); return; } source.subscribe(parent); }
@Override protected void subscribeActual(Subscriber<? super Void> s) { Nono np; try { np = ObjectHelper.requireNonNull(supplier.call(), "The supplier returned a null Nono"); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); EmptySubscription.error(ex, s); return; } np.subscribe(s); }
@Override protected void subscribeActual(Subscriber<? super Void> s) { s.onSubscribe(EmptySubscription.INSTANCE); try { action.run(); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); s.onError(ex); return; } s.onComplete(); }
@Override protected void subscribeActual(Subscriber<? super Void> s) { Throwable ex; try { ex = ObjectHelper.requireNonNull(errorSupplier.call(), "The errorSupplier returned a null Throwable"); } catch (Throwable e) { Exceptions.throwIfFatal(e); ex = e; } EmptySubscription.error(ex, s); }
@Override protected void subscribeActual(Subscriber<? super T> s) { Throwable ex; try { ex = ObjectHelper.requireNonNull(errorSupplier.call(), "The errorSupplier returned a null Throwable"); } catch (Throwable exc) { Exceptions.throwIfFatal(exc); ex = exc; } EmptySubscription.error(ex, s); }
@Override protected void subscribeActual(Subscriber<? super R> s) { int n = 0; @SuppressWarnings("unchecked") Solo<? extends T>[] array = new Solo[8]; try { for (Solo<? extends T> inner : sources) { if (n == array.length) { array = Arrays.copyOf(array, n + (n >> 1)); } array[n++] = ObjectHelper.requireNonNull(inner, "One of the source Solo is null"); } } catch (Throwable ex) { Exceptions.throwIfFatal(ex); EmptySubscription.error(ex, s); return; } if (n == 0) { EmptySubscription.complete(s); return; } else if (n == 1) { array[0].subscribe(new MapSubscriber<T, R>(s, this)); return; } ZipCoordinator<T, R> parent = new ZipCoordinator<T, R>(s, zipper, n); s.onSubscribe(parent); parent.subscribe(array, n); }
@Override protected void subscribeActual(Subscriber<? super T> s) { Perhaps<? extends T> sp; try { sp = ObjectHelper.requireNonNull(supplier.call(), "The supplier returned a null Solo"); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); EmptySubscription.error(ex, s); return; } sp.subscribe(s); }
@Override protected void subscribeActual(Subscriber<? super Void> s) { Subscriber<? super Void> z; try { z = ObjectHelper.requireNonNull(lifter.apply(s), "The lifter returned a null Subscriber"); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); EmptySubscription.error(ex, s); return; } source.subscribe(z); }
@Override protected void subscribeActual(Subscriber<? super T> s) { s.onSubscribe(EmptySubscription.INSTANCE); try { call(); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); s.onError(ex); return; } s.onComplete(); }
@Override protected void subscribeActual(Subscriber<? super T> subscriber) { ResourceFlowable<T> rf; try { rf = call.call(); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); EmptySubscription.error(ex, subscriber); return; } rf.subscribe(subscriber); }
@Override protected void subscribeActual(Subscriber<? super Void> s) { s.onSubscribe(EmptySubscription.INSTANCE); }
@Override protected void subscribeActual(Subscriber<? super Object> s) { EmptySubscription.complete(s); }
@Override protected void subscribeActual(Subscriber<? super T> s) { EmptySubscription.error(error, s); }
@Override protected void subscribeActual(Subscriber<? super Void> s) { EmptySubscription.error(error, s); }
@Override protected void subscribeActual(Subscriber<? super Void> s) { EmptySubscription.complete(s); }
@Override protected void subscribeActual(Subscriber<? super Object> s) { s.onSubscribe(EmptySubscription.INSTANCE); }