F
- the type of the flow of items.S
- the type of the single item.public abstract class FlowableWithSingle<F,S> extends Flowable<F> implements PublisherWithSingle<F,S>
Constructor and Description |
---|
FlowableWithSingle() |
Modifier and Type | Method and Description |
---|---|
@NotNull FlowableWithSingle<F,S> |
doOnSingle(@NotNull Consumer<? super S> singleConsumer)
Modifies the upstream so that it calls a consumer on emission of the single item of type
S . |
<FM,SM> @NotNull FlowableWithSingle<FM,SM> |
mapBoth(@NotNull Function<? super F,? extends FM> flowableMapper,
@NotNull Function<? super S,? extends SM> singleMapper)
Modifies the upstream so that it applies a specified function to the flow of items of type
F mapping
them to items of type FM and a specified function to the single item of type S mapping
it to an item of type SM . |
@NotNull FlowableWithSingle<F,S> |
mapError(@NotNull Function<? super Throwable,? extends Throwable> mapper)
Modifies the upstream so that it applies a specified function to an error which can map it to a different error.
|
<SM> @NotNull FlowableWithSingle<F,SM> |
mapSingle(@NotNull Function<? super S,? extends SM> singleMapper)
Modifies the upstream so that it applies a specified function to the single item of type
S mapping
it to an item of type SM . |
@NotNull FlowableWithSingle<F,S> |
observeOnBoth(@NotNull Scheduler scheduler)
Modifies the upstream to perform its emissions and notifications including the single item on a specified
Scheduler asynchronously with a bounded buffer of Flowable.bufferSize() slots. |
@NotNull FlowableWithSingle<F,S> |
observeOnBoth(@NotNull Scheduler scheduler,
boolean delayError)
Modifies the upstream to perform its emissions and notifications including the single item on a specified
Scheduler asynchronously with a bounded buffer and optionally delays onError notifications. |
@NotNull FlowableWithSingle<F,S> |
observeOnBoth(@NotNull Scheduler scheduler,
boolean delayError,
int bufferSize)
Modifies the upstream to perform its emissions and notifications including the single item on a specified
Scheduler asynchronously with a bounded buffer of configurable size and optionally delays onError
notifications. |
void |
subscribeBoth(@NotNull FlowableWithSingleSubscriber<? super F,? super S> subscriber)
Special version of
subscribeBoth(WithSingleSubscriber) with a FlowableWithSingleSubscriber . |
void |
subscribeBoth(@NotNull WithSingleSubscriber<? super F,? super S> subscriber)
Subscribes to this PublisherWithSingle . |
protected abstract void |
subscribeBothActual(@NotNull WithSingleSubscriber<? super F,? super S> subscriber) |
@NotNull CompletableFuture<S> |
subscribeSingleFuture()
Subscribes to this Flowable and returns a future for the single item. |
@NotNull CompletableFuture<S> |
subscribeSingleFuture(@NotNull Consumer<? super F> onNext)
Subscribes to this Flowable and returns a future for the single item. |
@NotNull CompletableFuture<S> |
subscribeSingleFuture(@NotNull Consumer<? super F> onNext,
@NotNull Consumer<? super Throwable> onError)
Subscribes to this Flowable and returns a future for the single item. |
@NotNull CompletableFuture<S> |
subscribeSingleFuture(@NotNull Consumer<? super F> onNext,
@NotNull Consumer<? super Throwable> onError,
@NotNull Action onComplete)
Subscribes to this Flowable and returns a future for the single
item. |
@NotNull CompletableFuture<S> |
subscribeSingleFuture(@NotNull Subscriber<? super F> subscriber)
Subscribes to this Flowable and returns a future for the single item. |
all, amb, ambArray, ambWith, any, as, blockingFirst, blockingFirst, blockingForEach, blockingIterable, blockingIterable, blockingLast, blockingLast, blockingLatest, blockingMostRecent, blockingNext, blockingSingle, blockingSingle, blockingSubscribe, blockingSubscribe, blockingSubscribe, blockingSubscribe, blockingSubscribe, blockingSubscribe, blockingSubscribe, blockingSubscribe, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, bufferSize, cache, cacheWithInitialCapacity, cast, collect, collectInto, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatestDelayError, combineLatestDelayError, combineLatestDelayError, combineLatestDelayError, combineLatestDelayError, combineLatestDelayError, compose, concat, concat, concat, concat, concat, concat, concatArray, concatArrayDelayError, concatArrayEager, concatArrayEager, concatArrayEagerDelayError, concatArrayEagerDelayError, concatDelayError, concatDelayError, concatDelayError, concatEager, concatEager, concatEager, concatEager, concatMap, concatMap, concatMapCompletable, concatMapCompletable, concatMapCompletableDelayError, concatMapCompletableDelayError, concatMapCompletableDelayError, concatMapDelayError, concatMapDelayError, concatMapEager, concatMapEager, concatMapEagerDelayError, concatMapEagerDelayError, concatMapIterable, concatMapIterable, concatMapMaybe, concatMapMaybe, concatMapMaybeDelayError, concatMapMaybeDelayError, concatMapMaybeDelayError, concatMapSingle, concatMapSingle, concatMapSingleDelayError, concatMapSingleDelayError, concatMapSingleDelayError, concatWith, concatWith, concatWith, concatWith, contains, count, create, debounce, debounce, debounce, defaultIfEmpty, defer, delay, delay, delay, delay, delay, delay, delaySubscription, delaySubscription, delaySubscription, dematerialize, dematerialize, distinct, distinct, distinct, distinctUntilChanged, distinctUntilChanged, distinctUntilChanged, doAfterNext, doAfterTerminate, doFinally, doOnCancel, doOnComplete, doOnEach, doOnEach, doOnError, doOnLifecycle, doOnNext, doOnRequest, doOnSubscribe, doOnTerminate, elementAt, elementAt, elementAtOrError, empty, error, error, filter, first, firstElement, firstOrError, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMapCompletable, flatMapCompletable, flatMapIterable, flatMapIterable, flatMapIterable, flatMapIterable, flatMapMaybe, flatMapMaybe, flatMapSingle, flatMapSingle, forEach, forEachWhile, forEachWhile, forEachWhile, fromArray, fromCallable, fromFuture, fromFuture, fromFuture, fromFuture, fromIterable, fromPublisher, generate, generate, generate, generate, generate, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupJoin, hide, ignoreElements, interval, interval, interval, interval, intervalRange, intervalRange, isEmpty, join, just, just, just, just, just, just, just, just, just, just, last, lastElement, lastOrError, lift, limit, map, materialize, merge, merge, merge, merge, merge, merge, merge, merge, mergeArray, mergeArray, mergeArrayDelayError, mergeArrayDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeWith, mergeWith, mergeWith, mergeWith, never, observeOn, observeOn, observeOn, ofType, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureDrop, onBackpressureDrop, onBackpressureLatest, onErrorResumeNext, onErrorResumeNext, onErrorReturn, onErrorReturnItem, onExceptionResumeNext, onTerminateDetach, parallel, parallel, parallel, publish, publish, publish, publish, range, rangeLong, rebatchRequests, reduce, reduce, reduceWith, repeat, repeat, repeatUntil, repeatWhen, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, retry, retry, retry, retry, retry, retryUntil, retryWhen, safeSubscribe, sample, sample, sample, sample, sample, sample, scan, scan, scanWith, sequenceEqual, sequenceEqual, sequenceEqual, sequenceEqual, serialize, share, single, singleElement, singleOrError, skip, skip, skip, skipLast, skipLast, skipLast, skipLast, skipLast, skipLast, skipUntil, skipWhile, sorted, sorted, startWith, startWith, startWith, startWithArray, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribeActual, subscribeOn, subscribeOn, subscribeWith, switchIfEmpty, switchMap, switchMap, switchMapCompletable, switchMapCompletableDelayError, switchMapDelayError, switchMapDelayError, switchMapMaybe, switchMapMaybeDelayError, switchMapSingle, switchMapSingleDelayError, switchOnNext, switchOnNext, switchOnNextDelayError, switchOnNextDelayError, take, take, take, takeLast, takeLast, takeLast, takeLast, takeLast, takeLast, takeLast, takeLast, takeLast, takeUntil, takeUntil, takeWhile, test, test, test, throttleFirst, throttleFirst, throttleLast, throttleLast, throttleLatest, throttleLatest, throttleLatest, throttleLatest, throttleWithTimeout, throttleWithTimeout, timeInterval, timeInterval, timeInterval, timeInterval, timeout, timeout, timeout, timeout, timeout, timeout, timeout, timeout, timer, timer, timestamp, timestamp, timestamp, timestamp, to, toFuture, toList, toList, toList, toMap, toMap, toMap, toMultimap, toMultimap, toMultimap, toMultimap, toObservable, toSortedList, toSortedList, toSortedList, toSortedList, unsafeCreate, unsubscribeOn, using, using, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, withLatestFrom, withLatestFrom, withLatestFrom, withLatestFrom, withLatestFrom, withLatestFrom, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zipArray, zipIterable, zipWith, zipWith, zipWith, zipWith
@CheckReturnValue @BackpressureSupport(value=FULL) @SchedulerSupport(value="custom") @NotNull public final @NotNull FlowableWithSingle<F,S> observeOnBoth(@NotNull @NotNull Scheduler scheduler)
Scheduler
asynchronously with a bounded buffer of Flowable.bufferSize()
slots.scheduler
- see Flowable.observeOn(Scheduler)
.FlowableWithSingle
modified so that its Subscriber
s are notified on the
specified Scheduler
.Flowable.observeOn(Scheduler)
@CheckReturnValue @BackpressureSupport(value=FULL) @SchedulerSupport(value="custom") @NotNull public final @NotNull FlowableWithSingle<F,S> observeOnBoth(@NotNull @NotNull Scheduler scheduler, boolean delayError)
Scheduler
asynchronously with a bounded buffer and optionally delays onError notifications.scheduler
- see Flowable.observeOn(Scheduler)
.delayError
- see Flowable.observeOn(Scheduler)
.FlowableWithSingle
modified so that its Subscriber
s are notified on the
specified Scheduler
.Flowable.observeOn(Scheduler)
@CheckReturnValue @BackpressureSupport(value=FULL) @SchedulerSupport(value="custom") @NotNull public final @NotNull FlowableWithSingle<F,S> observeOnBoth(@NotNull @NotNull Scheduler scheduler, boolean delayError, int bufferSize)
Scheduler
asynchronously with a bounded buffer of configurable size and optionally delays onError
notifications.scheduler
- see Flowable.observeOn(Scheduler)
.delayError
- see Flowable.observeOn(Scheduler)
.bufferSize
- see Flowable.observeOn(Scheduler)
.FlowableWithSingle
modified so that its Subscriber
s are notified on the
specified Scheduler
.Flowable.observeOn(Scheduler)
@CheckReturnValue @BackpressureSupport(value=PASS_THROUGH) @SchedulerSupport(value="none") @NotNull public final <SM> @NotNull FlowableWithSingle<F,SM> mapSingle(@NotNull @NotNull Function<? super S,? extends SM> singleMapper)
S
mapping
it to an item of type SM
.SM
- the type of the mapped single item.singleMapper
- the mapper function to apply to the single item.FlowableWithSingle
that applies the mapper function to the single item.@CheckReturnValue @BackpressureSupport(value=PASS_THROUGH) @SchedulerSupport(value="none") @NotNull public final <FM,SM> @NotNull FlowableWithSingle<FM,SM> mapBoth(@NotNull @NotNull Function<? super F,? extends FM> flowableMapper, @NotNull @NotNull Function<? super S,? extends SM> singleMapper)
F
mapping
them to items of type FM
and a specified function to the single item of type S
mapping
it to an item of type SM
.FM
- the type of the mapped flow items.SM
- the type of the mapped single item.flowableMapper
- the mapper function to apply to the flow items.singleMapper
- the mapper function to apply to the single item.FlowableWithSingle
that applies the mapper functions to the single item and the flow items.@CheckReturnValue @BackpressureSupport(value=PASS_THROUGH) @SchedulerSupport(value="none") @NotNull public final @NotNull FlowableWithSingle<F,S> mapError(@NotNull @NotNull Function<? super Throwable,? extends Throwable> mapper)
mapper
- the mapper function to apply to an error.FlowableWithSingle
that applies the mapper function to an error.@CheckReturnValue @BackpressureSupport(value=PASS_THROUGH) @SchedulerSupport(value="none") @NotNull public final @NotNull FlowableWithSingle<F,S> doOnSingle(@NotNull @NotNull Consumer<? super S> singleConsumer)
S
.singleConsumer
- the consumer of the single item.FlowableWithSingle
that calls the consumer with the single item.@BackpressureSupport(value=SPECIAL) @SchedulerSupport(value="none") public final void subscribeBoth(@NotNull @NotNull WithSingleSubscriber<? super F,? super S> subscriber)
PublisherWithSingle
Subscribes
to this PublisherWithSingle
.
In addition to signalling the stream of items via onNext
, the single
item is signalled via onSingle
.
subscribeBoth
in interface PublisherWithSingle<F,S>
subscriber
- the WithSingleSubscriber
that will consume signals from this PublisherWithSingle
.Publisher.subscribe(Subscriber)
@BackpressureSupport(value=SPECIAL) @SchedulerSupport(value="none") public final void subscribeBoth(@NotNull @NotNull FlowableWithSingleSubscriber<? super F,? super S> subscriber)
subscribeBoth(WithSingleSubscriber)
with a FlowableWithSingleSubscriber
.subscriber
- the FlowableWithSingleSubscriber
.subscribeBoth(WithSingleSubscriber)
protected abstract void subscribeBothActual(@NotNull @NotNull WithSingleSubscriber<? super F,? super S> subscriber)
@CheckReturnValue @BackpressureSupport(value=UNBOUNDED_IN) @SchedulerSupport(value="none") @NotNull public final @NotNull CompletableFuture<S> subscribeSingleFuture()
Subscribes
to this Flowable and returns a future for the single item.
FlowableWithSingle
emits a single item.
NoSuchElementException
if this FlowableWithSingle
completes but no single item was emitted.
FlowableWithSingle
if it
errors before the single item was emitted.
FlowableWithSingle
also when the future already completed
normally or exceptionally.
Flowable.subscribe()
@CheckReturnValue @BackpressureSupport(value=UNBOUNDED_IN) @SchedulerSupport(value="none") @NotNull public final @NotNull CompletableFuture<S> subscribeSingleFuture(@NotNull @NotNull Consumer<? super F> onNext)
Subscribes
to this Flowable and returns a future for the single item.
FlowableWithSingle
emits a single item.
NoSuchElementException
if this FlowableWithSingle
completes but no single item was emitted.
FlowableWithSingle
if it
errors before the single item was emitted.
FlowableWithSingle
also when the future already completed
normally or exceptionally.
onNext
- see Flowable.subscribe(Consumer)
Flowable.subscribe(Consumer)
@CheckReturnValue @BackpressureSupport(value=UNBOUNDED_IN) @SchedulerSupport(value="none") @NotNull public final @NotNull CompletableFuture<S> subscribeSingleFuture(@NotNull @NotNull Consumer<? super F> onNext, @NotNull @NotNull Consumer<? super Throwable> onError)
Subscribes
to this Flowable and returns a future for the single item.
FlowableWithSingle
emits a single item.
NoSuchElementException
if this FlowableWithSingle
completes but no single item was emitted.
FlowableWithSingle
if it
errors before the single item was emitted.
FlowableWithSingle
also when the future already completed
normally or exceptionally.
onNext
- see Flowable.subscribe(Consumer, Consumer)
onError
- see Flowable.subscribe(Consumer, Consumer)
Flowable.subscribe(Consumer, Consumer)
@CheckReturnValue @BackpressureSupport(value=UNBOUNDED_IN) @SchedulerSupport(value="none") @NotNull public final @NotNull CompletableFuture<S> subscribeSingleFuture(@NotNull @NotNull Consumer<? super F> onNext, @NotNull @NotNull Consumer<? super Throwable> onError, @NotNull @NotNull Action onComplete)
Subscribes
to this Flowable and returns a future for the single
item.
FlowableWithSingle
emits a single item.
NoSuchElementException
if this FlowableWithSingle
completes but no single item was emitted.
FlowableWithSingle
if it
errors before the single item was emitted.
FlowableWithSingle
also when the future already completed
normally or exceptionally.
onNext
- see Flowable.subscribe(Consumer, Consumer, Action)
onError
- see Flowable.subscribe(Consumer, Consumer, Action)
onComplete
- see Flowable.subscribe(Consumer, Consumer, Action)
Flowable.subscribe(Consumer, Consumer, Action)
@CheckReturnValue @BackpressureSupport(value=UNBOUNDED_IN) @SchedulerSupport(value="none") @NotNull public final @NotNull CompletableFuture<S> subscribeSingleFuture(@NotNull @NotNull Subscriber<? super F> subscriber)
Subscribes
to this Flowable and returns a future for the single item.
FlowableWithSingle
emits a single item.
NoSuchElementException
if this FlowableWithSingle
completes but no single item was emitted.
FlowableWithSingle
if it
errors before the single item was emitted.
FlowableWithSingle
also when the future already completed
normally or exceptionally.
subscriber
- see Flowable.subscribe(Subscriber)
Flowable.subscribe(Subscriber)