java.lang.Object
io.smallrye.mutiny.groups.MultiOnCompletion<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncontinueWith(Iterable<T> items) When the upstreamMulticompletes, continue with the given items.continueWith(Supplier<? extends Iterable<? extends T>> supplier) continueWith(T... items) When the upstreamMulticompletes, continue with the given items.fail()LikefailWith(Throwable)but using aNoSuchElementException.When the currentMulticompletes, the passed failure is sent downstream.ifEmpty()switchTo(Flow.Publisher<? extends T> other) When the upstreamMulticompletes, it continues with the events fired by the passedFlow.Publisher/Multi.switchTo(Supplier<Flow.Publisher<? extends T>> supplier) When the upstreamMulticompletes, it continues with the events fired by aFlow.Publisherproduces with the givenSupplier.switchToEmitter(Consumer<MultiEmitter<? super T>> consumer) When the upstreamMulticompletes, it continues with the events fired with the emitter passed to theconsumercallback.
-
Constructor Details
-
MultiOnCompletion
-
-
Method Details
-
invoke
- Parameters:
action- the action, must not benull- Returns:
- the new
Multi
-
call
-
failWith
When the currentMulticompletes, the passed failure is sent downstream.- Parameters:
failure- the failure- Returns:
- the new
Multi
-
failWith
- Parameters:
supplier- the supplier to produce the failure, must not benull, must not producenull- Returns:
- the new
Multi
-
fail
LikefailWith(Throwable)but using aNoSuchElementException.- Returns:
- the new
Multi
-
switchToEmitter
When the upstreamMulticompletes, it continues with the events fired with the emitter passed to theconsumercallback.If the upstream
Multifails, the switch does not apply.- Parameters:
consumer- the callback receiving the emitter to fire the events. Must not benull. Throwing exception in this function propagates a failure downstream.- Returns:
- the new
Multi
-
switchTo
When the upstreamMulticompletes, it continues with the events fired by the passedFlow.Publisher/Multi.If the upstream
Multifails, the switch does not apply.- Parameters:
other- the stream to switch to when the upstream completes.- Returns:
- the new
Multi
-
switchTo
When the upstreamMulticompletes, it continues with the events fired by aFlow.Publisherproduces with the givenSupplier.- Parameters:
supplier- the supplier to use to produce the publisher, must not benull, must not returnnulls- Returns:
- the new
Uni
-
continueWith
When the upstreamMulticompletes, continue with the given items.- Parameters:
items- the items, must not benull, must not containnull- Returns:
- the new
Multi
-
continueWith
When the upstreamMulticompletes, continue with the given items.- Parameters:
items- the items, must not benull, must not containnull- Returns:
- the new
Multi
-
continueWith
- Parameters:
supplier- the supplier to produce the items, must not benull, must not producenull- Returns:
- the new
Multi
-
ifEmpty
-