/** * Runs the source observable to a terminal event, ignoring any values and rethrowing any exception. * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code blockingSubscribe} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @since 2.0 */ @SchedulerSupport(SchedulerSupport.NONE) public final void blockingSubscribe() { ObservableBlockingSubscribe.subscribe(this); }
/** * Runs the source observable to a terminal event, ignoring any values and rethrowing any exception. * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code blockingSubscribe} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @since 2.0 */ @SchedulerSupport(SchedulerSupport.NONE) public final void blockingSubscribe() { ObservableBlockingSubscribe.subscribe(this); }
/** * Subscribes to the source and calls the given callbacks <strong>on the current thread</strong>. * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code blockingSubscribe} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @param onNext the callback action for each source value * @param onError the callback action for an error event * @since 2.0 */ @SchedulerSupport(SchedulerSupport.NONE) public final void blockingSubscribe(Consumer<? super T> onNext, Consumer<? super Throwable> onError) { ObservableBlockingSubscribe.subscribe(this, onNext, onError, Functions.EMPTY_ACTION); }
/** * Subscribes to the source and calls the Observer methods <strong>on the current thread</strong>. * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code blockingSubscribe} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * The a dispose() call is composed through. * @param subscriber the subscriber to forward events and calls to in the current thread * @since 2.0 */ @SchedulerSupport(SchedulerSupport.NONE) public final void blockingSubscribe(Observer<? super T> subscriber) { ObservableBlockingSubscribe.subscribe(this, subscriber); }
/** * Subscribes to the source and calls the given callbacks <strong>on the current thread</strong>. * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code blockingSubscribe} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @param onNext the callback action for each source value * @param onError the callback action for an error event * @since 2.0 */ @SchedulerSupport(SchedulerSupport.NONE) public final void blockingSubscribe(Consumer<? super T> onNext, Consumer<? super Throwable> onError) { ObservableBlockingSubscribe.subscribe(this, onNext, onError, Functions.EMPTY_ACTION); }
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static <T> Completable mergeCompletableDelayError(Flowable<? extends CompletableSource> sources) { return mergeCompletableDelayError(sources, Integer.MAX_VALUE); }
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static <T> Single<T> firstOrError(Flowable<T> source) { return elementAtOrError(source, 0); }
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static <T> Flowable<T> concatMaybe(Flowable<? extends Maybe<? extends T>> sources) { return concatMaybe(sources, 2); }
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static <T> Completable mergeCompletable(Flowable<? extends CompletableSource> sources) { return mergeCompletable(sources, Integer.MAX_VALUE); }
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static <T> Flowable<T> concatSingle(Flowable<? extends Single<? extends T>> sources) { return concatSingle(sources, 2); }
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static <T> Single<T> first(Flowable<T> source, T defaultItem) { return elementAt(source, 0, defaultItem); }
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static <T> Maybe<T> firstElement(Flowable<T> source) { return elementAt(source, 0); }
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static <T, R> Flowable<R> mergeMaybe(Flowable<? extends Maybe<? extends R>> sources) { return mergeMaybe(sources, Integer.MAX_VALUE); }
/** * Returns a Completable instance that completes immediately when subscribed to. * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code complete} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @return a Completable instance that completes immediately */ @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable complete() { return RxJavaObservablePlugins.onAssembly(CompletableEmpty.INSTANCE); }
/** * Returns a Completable that never calls onError or onComplete. * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code never} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @return the singleton instance that never calls onError or onComplete */ @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable never() { return RxJavaObservablePlugins.onAssembly(CompletableNever.INSTANCE); }
/** * Returns a Completable instance that completes immediately when subscribed to. * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code complete} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @return a Completable instance that completes immediately */ @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable complete() { return RxJavaObservablePlugins.onAssembly(CompletableEmpty.INSTANCE); }
/** * Returns a Completable that never calls onError or onComplete. * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code never} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @return the singleton instance that never calls onError or onComplete */ @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable never() { return RxJavaObservablePlugins.onAssembly(CompletableNever.INSTANCE); }
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static <T, R> Flowable<R> flatMapPublisher(Maybe<T> source, Function<? super T, ? extends Publisher<? extends R>> mapper) { return toFlowable(source).flatMap(mapper); }
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static <T> Completable concatCompletable(Flowable<? extends CompletableSource> sources) { ObjectHelper.requireNonNull(sources, "sources is null"); return concatCompletable(sources, 2); }
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static <T> Completable flatMapCompletable(Flowable<T> source, Function<? super T, ? extends CompletableSource> mapper) { return flatMapCompletable(source, mapper, false, Flowable.bufferSize()); }