T - the value typepublic abstract class Solo<T>
extends java.lang.Object
implements org.reactivestreams.Publisher<T>
| Constructor and Description |
|---|
Solo() |
| Modifier and Type | Method and Description |
|---|---|
static <T> Solo<T> |
amb(java.lang.Iterable<? extends Solo<? extends T>> sources)
Emit the events of the Solo that reacts first.
|
static <T> Solo<T> |
ambArray(Solo<? extends T>... sources)
Emit the events of the Solo that reacts first.
|
Solo<T> |
ambWith(Solo<? extends T> other)
Signal the events of this or the other Solo whichever
signals first.
|
Solo<T> |
andThen(Nono other)
Run the given Nono after this Solo completes successfully and
emit that original success value only if the Nono completes normally.
|
io.reactivex.Flowable<T> |
andThen(org.reactivestreams.Publisher<? extends T> other)
Emits the success value of this Solo and then continues with
the events of the other Publisher.
|
T |
blockingGet()
Blockingly awaits indefinitely the success value of this Solo or rethrows
its error (wrapped into a RuntimeException if necessary).
|
T |
blockingGet(long timeout,
java.util.concurrent.TimeUnit unit)
Blockingly awaits at most the given timeout for the success
value of this Solo or rethrows
its error (wrapped into a RuntimeException if necessary).
|
void |
blockingSubscribe()
Blocks until this Solo terminates and ignores the signals it produced.
|
void |
blockingSubscribe(io.reactivex.functions.Consumer<? super T> onNext)
Blocks until this Solo terminates and calls the onNext with the success value.
|
void |
blockingSubscribe(io.reactivex.functions.Consumer<? super T> onNext,
io.reactivex.functions.Consumer<? super java.lang.Throwable> onError)
Blocks until this solo terminates and calls the onNext with the success value
or calls the onError with the error Throwable.
|
void |
blockingSubscribe(io.reactivex.functions.Consumer<? super T> onNext,
io.reactivex.functions.Consumer<? super java.lang.Throwable> onError,
io.reactivex.functions.Action onComplete)
Blocks until this Solo produces its terminal signal and calls the
appropriate callback(s) based on the signal type.
|
Solo<T> |
cache()
Caches the value or error event of the upstream Solo
and relays/replays it to Subscribers.
|
<R> Solo<R> |
compose(io.reactivex.functions.Function<? super Solo<T>,? extends Solo<R>> composer)
Applies a function to this Solo and returns the Solo it returned.
|
static <T> io.reactivex.Flowable<T> |
concat(java.lang.Iterable<? extends Solo<? extends T>> sources)
Concatenate the values in order from a sequence of Solo sources.
|
static <T> io.reactivex.Flowable<T> |
concat(org.reactivestreams.Publisher<? extends Solo<? extends T>> sources)
Concatenate the values in order from a sequence of Solo sources.
|
static <T> io.reactivex.Flowable<T> |
concat(org.reactivestreams.Publisher<? extends Solo<? extends T>> sources,
int prefetch)
Concatenate the values in order from a sequence of Solo sources.
|
static <T> io.reactivex.Flowable<T> |
concatArray(Solo<? extends T>... sources)
Concatenate the values in order from a sequence of Solo sources.
|
static <T> io.reactivex.Flowable<T> |
concatArrayDelayError(Solo<? extends T>... sources)
Concatenate the values in order from a sequence of Solo sources, delaying
errors till all sources terminate.
|
static <T> io.reactivex.Flowable<T> |
concatDelayError(java.lang.Iterable<? extends Solo<? extends T>> sources)
Concatenate the values in order from a sequence of Solo sources, delaying
errors till all sources terminate.
|
static <T> io.reactivex.Flowable<T> |
concatDelayError(org.reactivestreams.Publisher<? extends Solo<? extends T>> sources)
Concatenate the values in order from a sequence of Solo sources, delaying
errors till all sources terminate.
|
static <T> io.reactivex.Flowable<T> |
concatDelayError(org.reactivestreams.Publisher<? extends Solo<? extends T>> sources,
int prefetch)
Concatenate the values in order from a sequence of Solo sources, delaying
errors till all sources terminate.
|
static <T> io.reactivex.Flowable<T> |
concatDelayError(org.reactivestreams.Publisher<? extends Solo<? extends T>> sources,
int prefetch,
boolean tillTheEnd)
Concatenate the values in order from a sequence of Solo sources, delaying
errors till a source terminates or the whole sequence terminates.
|
io.reactivex.Flowable<T> |
concatWith(Solo<T> other)
Emits the success value of this Solo followed by the event of
the other Solo.
|
static <T> Solo<T> |
create(io.reactivex.SingleOnSubscribe<T> onCreate)
Create a Solo that for each incoming Subscriber calls a callback to
emit a sync or async events in a thread-safe, backpressure-aware and
cancellation-safe manner.
|
static <T> Solo<T> |
defer(java.util.concurrent.Callable<? extends Solo<T>> supplier)
Defers the creation of the actual Solo to the time when a Subscriber
subscribes to the returned Solo.
|
Solo<T> |
delay(long delay,
java.util.concurrent.TimeUnit unit)
Delay the emission of the signal of this Solo with the specified
time amount.
|
Solo<T> |
delay(long delay,
java.util.concurrent.TimeUnit unit,
io.reactivex.Scheduler scheduler)
Delay the emission of the signal of this Solo with the specified
time amount on the specified scheduler.
|
Solo<T> |
delay(org.reactivestreams.Publisher<?> other)
Delay the emission of the signal until the other Publisher signals
an item or completes.
|
Solo<T> |
delaySubscription(long delay,
java.util.concurrent.TimeUnit unit)
Delay the subscription to this Solo until the specified delay elapses.
|
Solo<T> |
delaySubscription(long delay,
java.util.concurrent.TimeUnit unit,
io.reactivex.Scheduler scheduler)
Delay the subscription to this Solo until the specified delay elapses.
|
Solo<T> |
delaySubscription(org.reactivestreams.Publisher<?> other)
Delay the subscription to this Solo until the other Publisher
signals a value or completes.
|
Solo<T> |
doAfterNext(io.reactivex.functions.Consumer<? super T> onAfterNext)
Executes a callback after the value is emitted to downstream.
|
Solo<T> |
doAfterTerminate(io.reactivex.functions.Action onAfterTerminate)
Executes the callback after this Solo terminates and the downstream
is notified.
|
Solo<T> |
doFinally(io.reactivex.functions.Action onFinally)
Executes the callback exactly if the upstream terminates or
the downstream cancels the sequence.
|
Solo<T> |
doOnCancel(io.reactivex.functions.Action onCancel)
Executes the callback if the downstream cancels the sequence.
|
Solo<T> |
doOnComplete(io.reactivex.functions.Action onComplete)
Executes a callback when the upstream completes normally.
|
Solo<T> |
doOnError(io.reactivex.functions.Consumer<? super java.lang.Throwable> onError)
Executes a callback when the upstream signals an error.
|
Solo<T> |
doOnNext(io.reactivex.functions.Consumer<? super T> onNext)
Executes a callback before the value is emitted to downstream.
|
Solo<T> |
doOnRequest(io.reactivex.functions.LongConsumer onRequest)
Executes the callback when the downstream requests from this Solo.
|
Solo<T> |
doOnSubscribe(io.reactivex.functions.Consumer<? super org.reactivestreams.Subscription> onSubscribe)
Executes a callback when the upstream calls onSubscribe.
|
static <T> Solo<T> |
error(java.util.concurrent.Callable<? extends java.lang.Throwable> errorSupplier)
Returns a Solo that signals the error returned from
the errorSupplier to each individual Subscriber.
|
static <T> Solo<T> |
error(java.lang.Throwable error)
Returns a Solo that signals the given error to Subscribers.
|
Perhaps<T> |
filter(io.reactivex.functions.Predicate<? super T> predicate)
Applies a predicate to the value and emits it if the predicate
returns true, completes otherwise.
|
<R> Solo<R> |
flatMap(io.reactivex.functions.Function<? super T,? extends Solo<? extends R>> mapper)
Maps the success value of this Solo into another Solo and
emits its signals.
|
<R> Solo<R> |
flatMap(io.reactivex.functions.Function<? super T,? extends Solo<? extends R>> onSuccessMapper,
io.reactivex.functions.Function<? super java.lang.Throwable,? extends Solo<? extends R>> onErrorMapper)
Maps the success value or the failure of this Solo into another
Solo and emits its signal.
|
<R> io.reactivex.Flowable<R> |
flatMapPublisher(io.reactivex.functions.Function<? super T,? extends org.reactivestreams.Publisher<? extends R>> mapper)
Maps the success value of this Solo into a Publisher and
emits its signals.
|
static <T> Solo<T> |
fromCallable(java.util.concurrent.Callable<T> callable)
Returns a Solo that calls the callable and emits its value or error.
|
static <T> Solo<T> |
fromFuture(java.util.concurrent.Future<? extends T> future)
When subscribed, the future is awaited blockingly and
indefinitely for its result value; null result
will yield a NoSuchElementException.
|
static <T> Solo<T> |
fromFuture(java.util.concurrent.Future<? extends T> future,
long timeout,
java.util.concurrent.TimeUnit unit)
When subscribed, the future is awaited blockingly for
a given amount of time for its result value; null result
will yield a NoSuchElementException and a timeout
will yield a TimeoutException.
|
static <T> Solo<T> |
fromPublisher(org.reactivestreams.Publisher<T> source)
Wraps a Publisher into a Solo and signals its only value,
NoSuchElementException if empty or IndexOutOfBoundsException if it has
more than one element.
|
static <T> Solo<T> |
fromSingle(io.reactivex.SingleSource<T> source)
Wraps a Single into a Solo and signals its events.
|
static <T> io.reactivex.functions.Function<Solo<T>,Solo<T>> |
getOnAssemblyHandler()
Returns the current onAssembly handler.
|
Solo<T> |
hide()
Hides the identity of this Solo, including its Subscription and
allows preventing fusion and other optimizations for diagnostic
purposes.
|
Nono |
ignoreElement()
Ignore the solo value of this Solo and only signal the terminal events.
|
static <T> Solo<T> |
just(T item)
Returns a Solo that signals the given item and completes.
|
<R> Solo<R> |
lift(io.reactivex.functions.Function<org.reactivestreams.Subscriber<? super R>,org.reactivestreams.Subscriber<? super T>> onLift)
Map the downstream Subscriber into an upstream Subscriber.
|
<R> Solo<R> |
map(io.reactivex.functions.Function<? super T,? extends R> mapper)
Maps the value of this Solo into another value via function.
|
Solo<T> |
mapError(io.reactivex.functions.Function<? super java.lang.Throwable,? extends java.lang.Throwable> errorMapper)
Maps the Throwable error of this Solo into another Throwable error type.
|
static <T> io.reactivex.Flowable<T> |
merge(java.lang.Iterable<? extends Solo<? extends T>> sources)
Merge the values in arbitrary order from a sequence of Solo sources.
|
static <T> io.reactivex.Flowable<T> |
merge(java.lang.Iterable<? extends Solo<? extends T>> sources,
int maxConcurrency)
Merge the values in arbitrary order from a sequence of Solo sources.
|
static <T> io.reactivex.Flowable<T> |
merge(org.reactivestreams.Publisher<? extends Solo<? extends T>> sources)
Merge the values in arbitrary order from a sequence of Solo sources.
|
static <T> io.reactivex.Flowable<T> |
merge(org.reactivestreams.Publisher<? extends Solo<? extends T>> sources,
int maxConcurrency)
Merge the values in arbitrary order from a sequence of Solo sources.
|
static <T> io.reactivex.Flowable<T> |
mergeArray(int maxConcurrency,
Solo<? extends T>... sources)
Merge the values in arbitrary order from a sequence of Solo sources.
|
static <T> io.reactivex.Flowable<T> |
mergeArray(Solo<? extends T>... sources)
Merge the values in arbitrary order from a sequence of Solo sources.
|
static <T> io.reactivex.Flowable<T> |
mergeArrayDelayError(int maxConcurrency,
Solo<? extends T>... sources)
Merge the values in arbitrary order from a sequence of Solo sources,
delaying errors till all sources terminate.
|
static <T> io.reactivex.Flowable<T> |
mergeArrayDelayError(Solo<? extends T>... sources)
Merge the values in arbitrary order from a sequence of Solo sources,
delaying errors till all sources terminate.
|
static <T> io.reactivex.Flowable<T> |
mergeDelayError(java.lang.Iterable<? extends Solo<? extends T>> sources)
Merge the values in arbitrary order from a sequence of Solo sources,
delaying errors till all sources terminate.
|
static <T> io.reactivex.Flowable<T> |
mergeDelayError(java.lang.Iterable<? extends Solo<? extends T>> sources,
int maxConcurrency)
Merge the values in arbitrary order from a sequence of Solo sources,
delaying errors till all sources terminate.
|
static <T> io.reactivex.Flowable<T> |
mergeDelayError(org.reactivestreams.Publisher<? extends Solo<? extends T>> sources)
Merge the values in arbitrary order from a sequence of Solo sources,
delaying errors till all sources terminate.
|
static <T> io.reactivex.Flowable<T> |
mergeDelayError(org.reactivestreams.Publisher<? extends Solo<? extends T>> sources,
int maxConcurrency)
Merge the values in arbitrary order from a sequence of Solo sources,
delaying errors till all sources terminate.
|
io.reactivex.Flowable<T> |
mergeWith(Solo<T> other)
Merges the values of this Solo and the other Solo into a
Flowable sequence.
|
static <T> Solo<T> |
never()
Returns a Solo that never signals an item or terminal event.
|
Solo<T> |
observeOn(io.reactivex.Scheduler scheduler)
Returns a Solo that delivers the onNext, onError and onComplete signals
from this Solo on the specified scheduler.
|
protected static <T> Solo<T> |
onAssembly(Solo<T> source) |
Solo<T> |
onErrorResumeNext(io.reactivex.functions.Function<? super java.lang.Throwable,? extends Solo<T>> errorHandler)
If the upstream signals an error, call a function and subscribe to
the Solo it returns.
|
Solo<T> |
onErrorResumeWith(Solo<T> next)
If the upstream signals an error, switch over to the next Solo
and emits its signal instead.
|
Solo<T> |
onErrorReturnItem(T item)
If the upstream signals an error, signal an item instead.
|
io.reactivex.Flowable<T> |
repeat()
Repeats this Solo indefinitely.
|
io.reactivex.Flowable<T> |
repeat(io.reactivex.functions.BooleanSupplier stop)
Repeats this Solo until the given boolean supplier returns true when an
repeat iteration of this Solo completes.
|
io.reactivex.Flowable<T> |
repeat(long times)
Repeats this Solo at most the given number of times.
|
io.reactivex.Flowable<T> |
repeatWhen(io.reactivex.functions.Function<? super io.reactivex.Flowable<java.lang.Object>,? extends org.reactivestreams.Publisher<?>> handler)
Repeats this Solo when the Publisher returned by the handler function emits
an item or terminates if this Publisher terminates.
|
Solo<T> |
retry()
Retry this Solo indefinitely if it fails.
|
Solo<T> |
retry(long times)
Retry this Solo at most the given number of times if it fails.
|
Solo<T> |
retry(io.reactivex.functions.Predicate<? super java.lang.Throwable> predicate)
Retry this Solo if the predicate returns true for the latest failure
Throwable.
|
Solo<T> |
retryWhen(io.reactivex.functions.Function<? super io.reactivex.Flowable<java.lang.Throwable>,? extends org.reactivestreams.Publisher<?>> handler)
Retry this solo if the Publisher returned by the handler signals an item
in response to the failure Throwable.
|
static <T> void |
setOnAssemblyHandler(io.reactivex.functions.Function<Solo<T>,Solo<T>> handler)
Set the onAssembly handler.
|
io.reactivex.disposables.Disposable |
subscribe()
Subscribe to this Solo and ignore any signal it produces.
|
io.reactivex.disposables.Disposable |
subscribe(io.reactivex.functions.Consumer<? super T> onNext)
Subscribes to this Solo and calls the onNext if this Solo succeeds.
|
io.reactivex.disposables.Disposable |
subscribe(io.reactivex.functions.Consumer<? super T> onNext,
io.reactivex.functions.Consumer<? super java.lang.Throwable> onError)
Subscribes to this Solo and calls the appropriate callback for the resulting signal.
|
io.reactivex.disposables.Disposable |
subscribe(io.reactivex.functions.Consumer<? super T> onNext,
io.reactivex.functions.Consumer<? super java.lang.Throwable> onError,
io.reactivex.functions.Action onComplete)
Subscribes to this Solo and calls the appropriate callback for the resulting signal.
|
void |
subscribe(org.reactivestreams.Subscriber<? super T> s) |
protected abstract void |
subscribeActual(org.reactivestreams.Subscriber<? super T> s)
Implement this method to react to a Subscriber subscribing to this Solo.
|
Solo<T> |
subscribeOn(io.reactivex.Scheduler scheduler)
Returns a Solo that subscribes to this Solo on the specified scheduler
and makes sure downstream requests are forwarded there as well.
|
<E extends org.reactivestreams.Subscriber<? super T>> |
subscribeWith(E s)
Subscribe with a Subscriber (subclass) and return it as is.
|
Solo<T> |
takeUntil(org.reactivestreams.Publisher<?> other)
Signal a NoSuchElementException if the other signals before this
Solo signals.
|
io.reactivex.subscribers.TestSubscriber<T> |
test()
Creates a TestSubscriber and subscribes it to this Solo.
|
io.reactivex.subscribers.TestSubscriber<T> |
test(boolean cancel)
Creates a TestSubscriber, optionally cancels it, and subscribes
it to this Solo.
|
io.reactivex.subscribers.TestSubscriber<T> |
test(long initialRequest)
Creates a TestSubscriber with the given initial request and
subscribes it to this Solo.
|
io.reactivex.subscribers.TestSubscriber<T> |
test(long initialRequest,
boolean cancel)
Creates a TestSubscriber with the given initial request,
optionally cancels it, and subscribes it to this Solo.
|
Solo<T> |
timeout(long timeout,
java.util.concurrent.TimeUnit unit)
Signal a TimeoutException if there is no item from this Solo within
the given timeout time.
|
Solo<T> |
timeout(long timeout,
java.util.concurrent.TimeUnit unit,
io.reactivex.Scheduler scheduler)
Signal a TimeoutException if there is no item from this Solo within
the given timeout time, running on the specified scheduler.
|
Solo<T> |
timeout(long timeout,
java.util.concurrent.TimeUnit unit,
io.reactivex.Scheduler scheduler,
Solo<T> fallback)
Fall back to another Solo if this Solo doesn't signal within the given
time period, waiting on the specified scheduler.
|
Solo<T> |
timeout(long timeout,
java.util.concurrent.TimeUnit unit,
Solo<T> fallback)
Fall back to another Solo if this Solo doesn't signal within the given
time period.
|
Solo<T> |
timeout(org.reactivestreams.Publisher<?> other)
Signal a TimeoutException if the other Publisher signals or completes
before this Solo signals a value.
|
Solo<T> |
timeout(org.reactivestreams.Publisher<?> other,
Solo<T> fallback)
Fall back to another Solo if the other Publisher signals or completes
before this Solo signals a value.
|
static Solo<java.lang.Long> |
timer(long delay,
java.util.concurrent.TimeUnit unit)
Signals a 0L after the specified amount of time has passed since
subscription.
|
static Solo<java.lang.Long> |
timer(long delay,
java.util.concurrent.TimeUnit unit,
io.reactivex.Scheduler scheduler)
Signals a 0L after the specified amount of time has passed since
subscription on the specified scheduler.
|
<R> R |
to(io.reactivex.functions.Function<? super Solo<T>,R> converter)
Applies the function, fluently to this Solo and returns the value it returns.
|
io.reactivex.Flowable<T> |
toFlowable()
Converts this Solo into a Flowable.
|
java.util.concurrent.Future<T> |
toFuture()
Converts this Solo into a Future and signals its single
value.
|
io.reactivex.Observable<T> |
toObservable()
Converts this Solo into an Observable.
|
io.reactivex.Single<T> |
toSingle()
Converts this Soli into a Single.
|
Solo<T> |
unsubscribeOn(io.reactivex.Scheduler scheduler)
Returns a Solo which when cancelled, cancels this Solo on the
specified scheduler.
|
static <T,R> Solo<T> |
using(java.util.concurrent.Callable<R> resourceSupplier,
io.reactivex.functions.Function<? super R,? extends Solo<T>> sourceSupplier,
io.reactivex.functions.Consumer<? super R> disposer)
Generate a resource and a Solo based on that resource and then
dispose that resource eagerly when the Solo terminates or the
downstream cancels the sequence.
|
static <T,R> Solo<T> |
using(java.util.concurrent.Callable<R> resourceSupplier,
io.reactivex.functions.Function<? super R,? extends Solo<T>> sourceSupplier,
io.reactivex.functions.Consumer<? super R> disposer,
boolean eager)
Generate a resource and a Solo based on that resource and then
dispose that resource eagerly when the Solo terminates or the
downstream cancels the sequence.
|
static <T,R> Solo<R> |
zip(java.lang.Iterable<? extends Solo<? extends T>> sources,
io.reactivex.functions.Function<? super java.lang.Object[],? extends R> zipper)
Combines the solo values of all the sources via a zipper function into a
single resulting value.
|
static <T,R> Solo<R> |
zipArray(io.reactivex.functions.Function<? super java.lang.Object[],? extends R> zipper,
Solo<? extends T>... sources)
Combines the solo values of all the sources via a zipper function into a
single resulting value.
|
<U,R> Solo<R> |
zipWith(Solo<U> other,
io.reactivex.functions.BiFunction<? super T,? super U,? extends R> zipper)
Combines the values of this and the other Solo via a BiFunction.
|
public static <T> io.reactivex.functions.Function<Solo<T>,Solo<T>> getOnAssemblyHandler()
T - the target value typepublic static <T> void setOnAssemblyHandler(io.reactivex.functions.Function<Solo<T>,Solo<T>> handler)
T - the target value typehandler - the handler, null clears the handlerpublic static <T> Solo<T> create(io.reactivex.SingleOnSubscribe<T> onCreate)
T - the value type emittedonCreate - the callback called for each individual subscriber with an
abstraction of the incoming Subscriber.public static <T> Solo<T> just(T item)
T - the value typeitem - the item, not nullpublic static <T> Solo<T> error(java.lang.Throwable error)
T - the value typeerror - the error to signal, not nullpublic static <T> Solo<T> error(java.util.concurrent.Callable<? extends java.lang.Throwable> errorSupplier)
T - the value typeerrorSupplier - the supplier called for each Subscriber to
return a Throwable to be signalledpublic static <T> Solo<T> fromCallable(java.util.concurrent.Callable<T> callable)
T - the value typecallable - the callable to callpublic static <T> Solo<T> never()
T - the value typepublic static <T> Solo<T> defer(java.util.concurrent.Callable<? extends Solo<T>> supplier)
T - the value typesupplier - the supplier of the actual Solopublic static <T> Solo<T> fromPublisher(org.reactivestreams.Publisher<T> source)
T - the value typesource - the source Publisherpublic static <T> Solo<T> fromSingle(io.reactivex.SingleSource<T> source)
T - the value typesource - the source Singlepublic static <T> Solo<T> fromFuture(java.util.concurrent.Future<? extends T> future)
T - the value typefuture - the future to awaitpublic static <T> Solo<T> fromFuture(java.util.concurrent.Future<? extends T> future, long timeout, java.util.concurrent.TimeUnit unit)
T - the value typefuture - the future to awaittimeout - the timeout valueunit - the time unitpublic static <T> Solo<T> amb(java.lang.Iterable<? extends Solo<? extends T>> sources)
T - the common value typesources - the Iterable sequence of Solo sourcespublic static <T> Solo<T> ambArray(Solo<? extends T>... sources)
T - the common value typesources - the array of Solo sourcespublic static <T> io.reactivex.Flowable<T> concat(java.lang.Iterable<? extends Solo<? extends T>> sources)
T - the common base value typesources - the sequence of sourcespublic static <T> io.reactivex.Flowable<T> concat(org.reactivestreams.Publisher<? extends Solo<? extends T>> sources)
T - the common base value typesources - the sequence of sourcespublic static <T> io.reactivex.Flowable<T> concat(org.reactivestreams.Publisher<? extends Solo<? extends T>> sources, int prefetch)
T - the common base value typesources - the sequence of sourcesprefetch - the number of sources to prefetch from upstreampublic static <T> io.reactivex.Flowable<T> concatArray(Solo<? extends T>... sources)
T - the common base value typesources - the sequence of sourcespublic static <T> io.reactivex.Flowable<T> concatDelayError(java.lang.Iterable<? extends Solo<? extends T>> sources)
T - the common base value typesources - the sequence of sourcespublic static <T> io.reactivex.Flowable<T> concatDelayError(org.reactivestreams.Publisher<? extends Solo<? extends T>> sources)
T - the common base value typesources - the sequence of sourcespublic static <T> io.reactivex.Flowable<T> concatDelayError(org.reactivestreams.Publisher<? extends Solo<? extends T>> sources, int prefetch)
T - the common base value typesources - the sequence of sourcesprefetch - the number of sources to prefetch from upstreampublic static <T> io.reactivex.Flowable<T> concatDelayError(org.reactivestreams.Publisher<? extends Solo<? extends T>> sources, int prefetch, boolean tillTheEnd)
T - the common base value typesources - the sequence of sourcesprefetch - the number of sources to prefetch from upstreamtillTheEnd - if true, errors are delayed to the very end;
if false, an error will be signalled at the end of one sourcepublic static <T> io.reactivex.Flowable<T> concatArrayDelayError(Solo<? extends T>... sources)
T - the common base value typesources - the sequence of sourcespublic static <T> io.reactivex.Flowable<T> merge(java.lang.Iterable<? extends Solo<? extends T>> sources)
T - the common base value typesources - the sequence of sourcespublic static <T> io.reactivex.Flowable<T> merge(java.lang.Iterable<? extends Solo<? extends T>> sources, int maxConcurrency)
T - the common base value typesources - the sequence of sourcesmaxConcurrency - the maximum number of active subscriptionspublic static <T> io.reactivex.Flowable<T> merge(org.reactivestreams.Publisher<? extends Solo<? extends T>> sources)
T - the common base value typesources - the sequence of sourcespublic static <T> io.reactivex.Flowable<T> merge(org.reactivestreams.Publisher<? extends Solo<? extends T>> sources, int maxConcurrency)
T - the common base value typesources - the sequence of sourcesmaxConcurrency - the maximum number of active subscriptionspublic static <T> io.reactivex.Flowable<T> mergeArray(Solo<? extends T>... sources)
T - the common base value typesources - the sequence of sourcespublic static <T> io.reactivex.Flowable<T> mergeArray(int maxConcurrency,
Solo<? extends T>... sources)
T - the common base value typesources - the sequence of sourcesmaxConcurrency - the maximum number of active subscriptionspublic static <T> io.reactivex.Flowable<T> mergeDelayError(java.lang.Iterable<? extends Solo<? extends T>> sources)
T - the common base value typesources - the sequence of sourcespublic static <T> io.reactivex.Flowable<T> mergeDelayError(java.lang.Iterable<? extends Solo<? extends T>> sources, int maxConcurrency)
T - the common base value typesources - the sequence of sourcesmaxConcurrency - the maximum number of active subscriptionspublic static <T> io.reactivex.Flowable<T> mergeDelayError(org.reactivestreams.Publisher<? extends Solo<? extends T>> sources)
T - the common base value typesources - the sequence of sourcespublic static <T> io.reactivex.Flowable<T> mergeDelayError(org.reactivestreams.Publisher<? extends Solo<? extends T>> sources, int maxConcurrency)
T - the common base value typesources - the sequence of sourcesmaxConcurrency - the maximum number of active subscriptionspublic static <T> io.reactivex.Flowable<T> mergeArrayDelayError(Solo<? extends T>... sources)
T - the common base value typesources - the sequence of sourcespublic static <T> io.reactivex.Flowable<T> mergeArrayDelayError(int maxConcurrency,
Solo<? extends T>... sources)
T - the common base value typesources - the sequence of sourcesmaxConcurrency - the maximum number of active subscriptionspublic static Solo<java.lang.Long> timer(long delay, java.util.concurrent.TimeUnit unit)
delay - the delay timeunit - the time unitpublic static Solo<java.lang.Long> timer(long delay, java.util.concurrent.TimeUnit unit, io.reactivex.Scheduler scheduler)
delay - the delay timeunit - the time unitscheduler - the scheduler to wait onpublic static <T,R> Solo<T> using(java.util.concurrent.Callable<R> resourceSupplier, io.reactivex.functions.Function<? super R,? extends Solo<T>> sourceSupplier, io.reactivex.functions.Consumer<? super R> disposer)
T - the value typeR - the resource typeresourceSupplier - the callback to get a resource for each subscribersourceSupplier - the function that returns a Solo for the generated resourcedisposer - the consumer of the resource once the upstream terminates or the
downstream cancelspublic static <T,R> Solo<T> using(java.util.concurrent.Callable<R> resourceSupplier, io.reactivex.functions.Function<? super R,? extends Solo<T>> sourceSupplier, io.reactivex.functions.Consumer<? super R> disposer, boolean eager)
T - the value typeR - the resource typeresourceSupplier - the callback to get a resource for each subscribersourceSupplier - the function that returns a Solo for the generated resourcedisposer - the consumer of the resource once the upstream terminates or the
downstream cancelseager - if true, the resource is disposed before the terminal event is emitted
if false, the resource is disposed after the terminal event has been emittedpublic static <T,R> Solo<R> zip(java.lang.Iterable<? extends Solo<? extends T>> sources, io.reactivex.functions.Function<? super java.lang.Object[],? extends R> zipper)
T - the common input base typeR - the result typesources - the sequence of Solo sourceszipper - the function takin in an array of values and returns a solo valuepublic static <T,R> Solo<R> zipArray(io.reactivex.functions.Function<? super java.lang.Object[],? extends R> zipper, Solo<? extends T>... sources)
T - the common input base typeR - the result typesources - the sequence of Solo sourceszipper - the function takin in an array of values and returns a solo valuepublic final Solo<T> ambWith(Solo<? extends T> other)
other - the other Solopublic final Solo<T> andThen(Nono other)
other - the other Nono to executepublic final io.reactivex.Flowable<T> andThen(org.reactivestreams.Publisher<? extends T> other)
other - the other Publisher instancepublic final io.reactivex.Flowable<T> concatWith(Solo<T> other)
other - the other Solo instancepublic final io.reactivex.Flowable<T> mergeWith(Solo<T> other)
other - the other Solo instancepublic final <U,R> Solo<R> zipWith(Solo<U> other, io.reactivex.functions.BiFunction<? super T,? super U,? extends R> zipper)
U - the other value typeR - the result value typeother - the other Solo sourcezipper - the bi-function taking the success value from this and
the other Solo and returns a solo value to be emitted.public final <R> Solo<R> map(io.reactivex.functions.Function<? super T,? extends R> mapper)
R - the output value typemapper - the function that receives the success value of this Solo
and returns a replacement value.public final Solo<T> mapError(io.reactivex.functions.Function<? super java.lang.Throwable,? extends java.lang.Throwable> errorMapper)
errorMapper - the function that receives the Throwable and should
return a Throwable to be emitted.public final Perhaps<T> filter(io.reactivex.functions.Predicate<? super T> predicate)
predicate - the predicate called with the solo valuepublic final Solo<T> timeout(long timeout, java.util.concurrent.TimeUnit unit)
timeout - the timeout valueunit - the time unitpublic final Solo<T> timeout(long timeout, java.util.concurrent.TimeUnit unit, io.reactivex.Scheduler scheduler)
timeout - the timeout valueunit - the time unitscheduler - the scheduler to wait onpublic final Solo<T> timeout(long timeout, java.util.concurrent.TimeUnit unit, Solo<T> fallback)
timeout - the timeout valueunit - the time unitfallback - the other Solo to subscribe topublic final Solo<T> timeout(long timeout, java.util.concurrent.TimeUnit unit, io.reactivex.Scheduler scheduler, Solo<T> fallback)
timeout - the timeout valueunit - the time unitscheduler - the scheduler to wait onfallback - the fallback Solo to subscribe topublic final Solo<T> timeout(org.reactivestreams.Publisher<?> other)
other - the other Publisher triggers the TimeoutException when
it signals its first item or completes.public final Solo<T> timeout(org.reactivestreams.Publisher<?> other, Solo<T> fallback)
other - the other Publisher triggers the TimeoutException when
it signals its first item or completes.fallback - the fallback Solo to subscribe to in case of a timeoutpublic final Solo<T> onErrorReturnItem(T item)
item - the item to signal if the upstream failspublic final Solo<T> onErrorResumeWith(Solo<T> next)
next - the other Solo to switch to in case of an upstream errorpublic final Solo<T> onErrorResumeNext(io.reactivex.functions.Function<? super java.lang.Throwable,? extends Solo<T>> errorHandler)
errorHandler - the function receiving the upstream error and
returns a Solo to resume with.public final <R> Solo<R> flatMap(io.reactivex.functions.Function<? super T,? extends Solo<? extends R>> mapper)
R - the result typemapper - the function that receives the success value and returns
another Solo to subscribe topublic final <R> Solo<R> flatMap(io.reactivex.functions.Function<? super T,? extends Solo<? extends R>> onSuccessMapper, io.reactivex.functions.Function<? super java.lang.Throwable,? extends Solo<? extends R>> onErrorMapper)
R - the result typeonSuccessMapper - the function that receives the success value and return
another Solo to subscribe toonErrorMapper - the function that receives the Throwable error and
return another Solo to subscribe topublic final <R> io.reactivex.Flowable<R> flatMapPublisher(io.reactivex.functions.Function<? super T,? extends org.reactivestreams.Publisher<? extends R>> mapper)
R - the result typemapper - the function that takes the success value of this Solo
and returns a Publisherpublic final Solo<T> takeUntil(org.reactivestreams.Publisher<?> other)
other - the other Publisherpublic final Solo<T> delay(long delay, java.util.concurrent.TimeUnit unit)
delay - the delay timeunit - the delay time unitpublic final Solo<T> delay(long delay, java.util.concurrent.TimeUnit unit, io.reactivex.Scheduler scheduler)
delay - the delay timeunit - the delay time unitscheduler - the scheduler to wait onpublic final Solo<T> delay(org.reactivestreams.Publisher<?> other)
other - the other Publisher that has to signal to emit the origina
signal from this Solopublic final Solo<T> delaySubscription(org.reactivestreams.Publisher<?> other)
other - the other Publisher to trigger the actual subscriptionpublic final Solo<T> delaySubscription(long delay, java.util.concurrent.TimeUnit unit)
delay - the delay timeunit - the delay unitpublic final Solo<T> delaySubscription(long delay, java.util.concurrent.TimeUnit unit, io.reactivex.Scheduler scheduler)
delay - the delay timeunit - the delay unitscheduler - the scheduler to wait onpublic final io.reactivex.Flowable<T> toFlowable()
public final io.reactivex.Observable<T> toObservable()
public final io.reactivex.Single<T> toSingle()
public final Solo<T> doOnSubscribe(io.reactivex.functions.Consumer<? super org.reactivestreams.Subscription> onSubscribe)
onSubscribe - the consumer called with the upstream Subscriptionpublic final Solo<T> doOnRequest(io.reactivex.functions.LongConsumer onRequest)
onRequest - the callback called with the request amountpublic final Solo<T> doOnCancel(io.reactivex.functions.Action onCancel)
onCancel - the action to callpublic final Solo<T> doOnNext(io.reactivex.functions.Consumer<? super T> onNext)
onNext - the consumer called with the current value before it is
is emitted to downstream.public final Solo<T> doAfterNext(io.reactivex.functions.Consumer<? super T> onAfterNext)
onAfterNext - the consumer called with the current value after it is
is emitted to downstream.public final Solo<T> doOnError(io.reactivex.functions.Consumer<? super java.lang.Throwable> onError)
onError - the consumer called before the error is emitted to
the downstreampublic final Solo<T> doOnComplete(io.reactivex.functions.Action onComplete)
onComplete - the consumer called before the completion event
is emitted to the downstream.public final Solo<T> doAfterTerminate(io.reactivex.functions.Action onAfterTerminate)
onAfterTerminate - the callback to call after the downstream is notifiedpublic final Solo<T> doFinally(io.reactivex.functions.Action onFinally)
onFinally - the action to callpublic final Nono ignoreElement()
public final Solo<T> hide()
public final <R> R to(io.reactivex.functions.Function<? super Solo<T>,R> converter)
R - the result typeconverter - the function receiving this Solo and returns a value to be returnedpublic final <R> Solo<R> compose(io.reactivex.functions.Function<? super Solo<T>,? extends Solo<R>> composer)
R - the result typecomposer - the function that receives this Solo and should return a Solopublic final <R> Solo<R> lift(io.reactivex.functions.Function<org.reactivestreams.Subscriber<? super R>,org.reactivestreams.Subscriber<? super T>> onLift)
R - the downstream value typeonLift - the function called with the downstream's Subscriber and
should return a Subscriber to be subscribed to this Solo.public final io.reactivex.Flowable<T> repeat()
public final io.reactivex.Flowable<T> repeat(long times)
times - the number of times to repeatpublic final io.reactivex.Flowable<T> repeat(io.reactivex.functions.BooleanSupplier stop)
stop - the supplier of a boolean value that should return true to
stop repeating.public final io.reactivex.Flowable<T> repeatWhen(io.reactivex.functions.Function<? super io.reactivex.Flowable<java.lang.Object>,? extends org.reactivestreams.Publisher<?>> handler)
handler - the function that receives Flowable that emits an item
when this Solo completes and returns a Publisher that should emit an item
to trigger a repeat or terminate to trigger a termination.public final Solo<T> retry()
public final Solo<T> retry(long times)
times - the number of times, Long.MAX_VALUE means indefinitelypublic final Solo<T> retry(io.reactivex.functions.Predicate<? super java.lang.Throwable> predicate)
predicate - the predicate receiving the latest Throwable and
if returns true, the Solo is retried.public final Solo<T> retryWhen(io.reactivex.functions.Function<? super io.reactivex.Flowable<java.lang.Throwable>,? extends org.reactivestreams.Publisher<?>> handler)
handler - the function that receives a Flowable that signals the
failure Throwable of this Solo and returns a Publisher which triggers a retry
or termination.public final Solo<T> subscribeOn(io.reactivex.Scheduler scheduler)
scheduler - the scheduler to subscribe onpublic final Solo<T> observeOn(io.reactivex.Scheduler scheduler)
scheduler - the scheduler to emit the events onpublic final Solo<T> unsubscribeOn(io.reactivex.Scheduler scheduler)
scheduler - the scheduler to cancel this Solopublic final Solo<T> cache()
public final void subscribe(org.reactivestreams.Subscriber<? super T> s)
subscribe in interface org.reactivestreams.Publisher<T>protected abstract void subscribeActual(org.reactivestreams.Subscriber<? super T> s)
s - the downstream Subscriber, never nullpublic final <E extends org.reactivestreams.Subscriber<? super T>> E subscribeWith(E s)
E - the Subscriber subclass types - the soubscriber, not nulls as ispublic final io.reactivex.disposables.Disposable subscribe()
public final io.reactivex.disposables.Disposable subscribe(io.reactivex.functions.Consumer<? super T> onNext)
onNext - called when this Solo succeedspublic final io.reactivex.disposables.Disposable subscribe(io.reactivex.functions.Consumer<? super T> onNext, io.reactivex.functions.Consumer<? super java.lang.Throwable> onError)
onNext - called when this Solo succeedsonError - called when this Solo failspublic final io.reactivex.disposables.Disposable subscribe(io.reactivex.functions.Consumer<? super T> onNext, io.reactivex.functions.Consumer<? super java.lang.Throwable> onError, io.reactivex.functions.Action onComplete)
onNext - called when this Solo succeedsonError - called when this Solo failsonComplete - called when this Solo succeeds after the call to onNextpublic final void blockingSubscribe()
public final void blockingSubscribe(io.reactivex.functions.Consumer<? super T> onNext)
onNext - the callback to call when this Solo completes with a success valuepublic final void blockingSubscribe(io.reactivex.functions.Consumer<? super T> onNext, io.reactivex.functions.Consumer<? super java.lang.Throwable> onError)
onNext - the callback to call when this Solo completes with a success valueonError - the callback to call when this Solo fails with an errorpublic final void blockingSubscribe(io.reactivex.functions.Consumer<? super T> onNext, io.reactivex.functions.Consumer<? super java.lang.Throwable> onError, io.reactivex.functions.Action onComplete)
onNext - called when the Solo succeedsonError - called when the Solo failsonComplete - called when the Solo succeeds after the call to onNext.public final T blockingGet()
public final T blockingGet(long timeout, java.util.concurrent.TimeUnit unit)
timeout - the time to wait for a success valueunit - the time unit of the timeoutpublic final io.reactivex.subscribers.TestSubscriber<T> test()
public final io.reactivex.subscribers.TestSubscriber<T> test(boolean cancel)
cancel - if true, the TestSubscriber will be cancelled before
subscribing to this Solopublic final io.reactivex.subscribers.TestSubscriber<T> test(long initialRequest)
initialRequest - the initial request amount, non-negativepublic final io.reactivex.subscribers.TestSubscriber<T> test(long initialRequest, boolean cancel)
initialRequest - the initial request amount, non-negativecancel - if true, the TestSubscriber will be cancelled before
subscribing to this Solopublic final java.util.concurrent.Future<T> toFuture()