Uses of Interface
io.helidon.common.reactive.Multi
Package
Description
Common reactive library for Helidon projects.
Helidon Reactive Messaging.
-
Uses of Multi in io.helidon.common.reactive
Modifier and TypeClassDescriptionfinal class
Concat streams to one.class
Deprecated, for removal: This API element is subject to removal in a future version.final class
Intercept the calls to the various Flow interface methods and calls the appropriate user callbacks.class
Output stream thatFlow.Publisher
publishes any data written to it asByteBuffer
events.Modifier and TypeMethodDescriptionIoMulti.MultiFromByteChannelBuilder.build()
IoMulti.MultiFromInputStreamBuilder.build()
default <U> Multi
<U> Multi.compose
(Function<? super Multi<T>, ? extends Flow.Publisher<? extends U>> composer) Apply the givencomposer
function to the currentMulti
instance and return aMulti
wrapping the returnedFlow.Publisher
of this function.static <T> Multi
<T> Multi.concat
(Flow.Publisher<T> firstMulti, Flow.Publisher<T> secondMulti) Concat streams to one.static <T> Multi
<T> Multi.concat
(Flow.Publisher<T> firstPublisher, Flow.Publisher<T> secondPublisher, Flow.Publisher<T>... morePublishers) Concat streams to one.static <T> Multi
<T> Multi.concatArray
(Flow.Publisher<T>... publishers) Concatenates an array of sourceFlow.Publisher
s by relaying items in order, non-overlappingly, one after the other finishes.static <T> Multi
<T> static <T> Multi
<T> Create aMulti
instance that publishes the given iterable.static <T> Multi
<T> Multi.create
(CompletionStage<T> completionStage) Wrap a CompletionStage into a Multi and signal its outcome non-blockingly.static <T> Multi
<T> Multi.create
(CompletionStage<T> completionStage, boolean nullMeansEmpty) Wrap a CompletionStage into a Multi and signal its outcome non-blockingly.static <T> Multi
<T> Multi.create
(Flow.Publisher<T> source) Create aMulti
instance wrapped around the given publisher.static <T> Multi
<T> static Multi
<ByteBuffer> IoMulti.createInputStream
(InputStream inputStream) Deprecated, for removal: This API element is subject to removal in a future version.please useIoMulti.multiFromStream(java.io.InputStream)
Multi.defaultIfEmpty
(Supplier<? extends T> supplier) Signals the default item supplied by specified supplier if the upstream is empty.Multi.defaultIfEmpty
(T defaultItem) Signals the default item if the upstream is empty.static <T> Multi
<T> Multi.defer
(Supplier<? extends Flow.Publisher<? extends T>> supplier) Call the given supplier function for each individual downstream Subscriber to return a Flow.Publisher to subscribe to.Multi.distinct()
Filter out all duplicates.Drop the longest prefix of elements from this stream that satisfy the given predicate.static <T> Multi
<T> Multi.empty()
Get aMulti
instance that completes immediately.static <T> Multi
<T> Create aMulti
instance that reports the given exception to its subscriber(s).Filter stream items with provided predicate.default <U> Multi
<U> Multi.flatMap
(Function<? super T, ? extends Flow.Publisher<? extends U>> publisherMapper) Transform item with supplied function and flatten resultingFlow.Publisher
to downstream.default <U> Multi
<U> Multi.flatMap
(Function<? super T, ? extends Flow.Publisher<? extends U>> mapper, long maxConcurrency, boolean delayErrors, long prefetch) Transform item with supplied function and flatten resultingFlow.Publisher
to downstream while limiting the maximum number of concurrent innerFlow.Publisher
s and their in-flight item count, optionally aggregating and delaying all errors until all sources terminate.default <U> Multi
<U> Single.flatMap
(Function<? super T, ? extends Flow.Publisher<? extends U>> mapper) Map thisSingle
instance to a publisher using the given mapper.default <U> Multi
<U> Multi.flatMapCompletionStage
(Function<? super T, ? extends CompletionStage<? extends U>> mapper) Transform item with supplied function and flatten resultingCompletionStage
results to downstream.default <U> Multi
<U> Multi.flatMapIterable
(Function<? super T, ? extends Iterable<? extends U>> iterableMapper) Transform item with supplied function and flatten resultingIterable
to downstream.default <U> Multi
<U> Multi.flatMapIterable
(Function<? super T, ? extends Iterable<? extends U>> iterableMapper, int prefetch) Transform item with supplied function and flatten resultingIterable
to downstream.default <U> Multi
<U> Single.flatMapIterable
(Function<? super T, ? extends Iterable<? extends U>> mapper) Maps the single upstream value into anIterable
and relays its items to the downstream.default <U> Multi
<U> Multi.flatMapOptional
(Function<? super T, Optional<? extends U>> mapper) Transform item with supplied function and flatten resultingOptional
to downstream as one item if present or nothing if empty.static <T> Multi
<T> Deprecated.usecreate(io.helidon.common.reactive.Single)
insteadstatic <T> Multi
<T> Deprecated.usecreate(java.lang.Iterable)
insteadstatic <T> Multi
<T> Multi.from
(CompletionStage<T> completionStage) Deprecated.usecreate(java.util.concurrent.CompletionStage)
insteadstatic <T> Multi
<T> Multi.from
(CompletionStage<T> completionStage, boolean nullMeansEmpty) Deprecated.static <T> Multi
<T> Multi.from
(Flow.Publisher<T> source) Deprecated.usecreate(java.util.concurrent.Flow.Publisher)
insteadstatic <T> Multi
<T> Deprecated.usecreate(java.util.stream.Stream)
insteadExecutes givenRunnable
when stream is finished without value(empty stream).Multi.interval
(long initialDelay, long period, TimeUnit unit, ScheduledExecutorService executor) Signal 0L after an initial delay, then 1L, 2L and so on periodically to the downstream.Multi.interval
(long period, TimeUnit unit, ScheduledExecutorService executor) Signal 0L, 1L and so on periodically to the downstream.static <T> Multi
<T> Multi.just
(Collection<T> items) Create aMulti
instance that publishes the given items to a single subscriber.static <T> Multi
<T> Multi.just
(T... items) Create aMulti
instance that publishes the given items to a single subscriber.Multi.limit
(long limit) Limit stream to allow only specified number of items to pass.Multi.log()
Log all signalsonSubscribe
,onNext
,onError
,onComplete
,cancel
andrequest
coming to and from preceding operator.Log all signalsonSubscribe
,onNext
,onError
,onComplete
,cancel
andrequest
coming to and from preceding operator.Log all signalsonSubscribe
,onNext
,onError
,onComplete
,cancel
andrequest
coming to and from preceding operator.Log all signalsonSubscribe
,onNext
,onError
,onComplete
,cancel
andrequest
coming to and from preceding operator.default <U> Multi
<U> static Multi
<ByteBuffer> IoMulti.multiFromByteChannel
(ReadableByteChannel byteChannel) Creates a multi that reads data from the provided byte channel.static Multi
<ByteBuffer> IoMulti.multiFromStream
(InputStream inputStream) static <T> Multi
<T> Multi.never()
Get aMulti
instance that never completes.Re-emit the upstream's signals to the downstream on the given executor's thread using a default buffer size of 32 and errors skipping ahead of items.Re-emit the upstream's signals to the downstream on the given executor's thread.Executes givenRunnable
when a cancel signal is received.Multi.onComplete
(Runnable onComplete) Executes givenRunnable
when onComplete signal is received.MultiTappedPublisher.onComplete
(Runnable onComplete) Multi.onCompleteResume
(T item) Resume stream from single item if onComplete signal is intercepted.Single.onCompleteResume
(T item) Resume stream from single item if onComplete signal is intercepted.Multi.onCompleteResumeWith
(Flow.Publisher<? extends T> publisher) Resume stream from supplied publisher if onComplete signal is intercepted.Single.onCompleteResumeWith
(Flow.Publisher<? extends T> publisher) Resume stream from supplied publisher if onComplete signal is intercepted.Executes givenRunnable
when onError signal is received.Multi.onErrorResume
(Function<? super Throwable, ? extends T> onError) Function
providing one item to be submitted as onNext in case of onError signal is received.Multi.onErrorResumeWith
(Function<? super Throwable, ? extends Flow.Publisher<? extends T>> onError) Resume stream from supplied publisher if onError signal is intercepted.Single.onErrorResumeWith
(Function<? super Throwable, ? extends Flow.Publisher<? extends T>> onError) Resume stream from supplied publisher if onError signal is intercepted.Multi.onTerminate
(Runnable onTerminate) Executes givenRunnable
when any of signals onComplete, onCancel or onError is received.MultiTappedPublisher.onTerminate
(Runnable onTerminate) Invoke provided consumer for every item in stream.Multi.range
(int start, int count) Emits a range of ever increasing integers.Multi.rangeLong
(long start, long count) Emits a range of ever increasing longs.Multi.retry
(long count) Retry a failing upstream at most the given number of times before giving up.Multi.retry
(BiPredicate<? super Throwable, ? super Long> predicate) Retry a failing upstream if the predicate returns true.Multi.retryWhen
(BiFunction<? super Throwable, ? super Long, ? extends Flow.Publisher<U>> whenFunction) Retry a failing upstream when the given function returns a publisher that signals an item.static <T> Multi
<T> Multi.singleton
(T item) Create aMulti
that emits a pre-existing item and then completes.Multi.skip
(long skip) Skip first n items, all the others are emitted.Multi.switchIfEmpty
(Flow.Publisher<T> other) Switch to the other publisher if the upstream is empty.Multi.takeUntil
(Flow.Publisher<U> other) Relay upstream items until the other source signals an item or completes.Take the longest prefix of elements from this stream that satisfy the given predicate.Multi.timeout
(long timeout, TimeUnit unit, ScheduledExecutorService executor) Signals aTimeoutException
if the upstream doesn't signal the next item, error or completion within the specified time.Multi.timeout
(long timeout, TimeUnit unit, ScheduledExecutorService executor, Flow.Publisher<T> fallback) Switches to a fallback single if the upstream doesn't signal the next item, error or completion within the specified time.Multi.timer
(long time, TimeUnit unit, ScheduledExecutorService executor) Signal 0L and complete the sequence after the given time elapsed.Modifier and TypeMethodDescriptionFunction
<? super Multi<ByteBuffer>, ? extends Single<Void>> IoMulti.MultiToByteChannelBuilder.build()
static Function
<? super Multi<ByteBuffer>, ? extends Single<Void>> IoMulti.multiToByteChannel
(WritableByteChannel writableChannel) Creates function consumingMulti<ByteBuffer>
to suppliedWritableByteChannel
.Modifier and TypeMethodDescriptionstatic <T> MultiTappedPublisher.Builder
<T> A builder to customize a multi tapped publisher instance.Modifier and TypeMethodDescriptiondefault <U> Multi
<U> Multi.compose
(Function<? super Multi<T>, ? extends Flow.Publisher<? extends U>> composer) Apply the givencomposer
function to the currentMulti
instance and return aMulti
wrapping the returnedFlow.Publisher
of this function.default <U> U
Apply the givenconverter
function to the currentMulti
instance and return the value returned by this function. -
Uses of Multi in io.helidon.messaging
Modifier and TypeMethodDescription<PAYLOAD> Messaging.Builder
Messaging.Builder.subscriber
(Channel<PAYLOAD> channel, Consumer<Multi<? extends Message<? extends PAYLOAD>>> consumer)
OutputStreamMulti
instead