Package io.smallrye.mutiny.groups
Class MultiOnTerminate<T>
- java.lang.Object
-
- io.smallrye.mutiny.groups.MultiOnTerminate<T>
-
public class MultiOnTerminate<T> extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description MultiOnTerminate(Multi<T> upstream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Multi<T>
call(java.util.function.BiFunction<java.lang.Throwable,java.lang.Boolean,Uni<?>> mapper)
Attaches an action that is executed when theMulti
emits a completion or a failure or when the subscriber cancels the subscription.Multi<T>
call(java.util.function.Supplier<Uni<?>> supplier)
Attaches an action that is executed when theMulti
emits a completion or a failure or when the subscriber cancels the subscription.Multi<T>
invoke(java.lang.Runnable action)
Attaches an action that is executed when theMulti
emits a completion or a failure or when the subscriber cancels the subscription.Multi<T>
invoke(java.util.function.BiConsumer<java.lang.Throwable,java.lang.Boolean> callback)
Attaches an action that is executed when theMulti
emits a completion or a failure or when the subscriber cancels the subscription.
-
-
-
Method Detail
-
invoke
@CheckReturnValue public Multi<T> invoke(java.util.function.BiConsumer<java.lang.Throwable,java.lang.Boolean> callback)
Attaches an action that is executed when theMulti
emits a completion or a failure or when the subscriber cancels the subscription.- Parameters:
callback
- the consumer receiving the failure if any and a boolean indicating whether the termination is due to a cancellation (the failure parameter would benull
in this case). Must not benull
.- Returns:
- the new
Multi
-
invoke
@CheckReturnValue public Multi<T> invoke(java.lang.Runnable action)
Attaches an action that is executed when theMulti
emits a completion or a failure or when the subscriber cancels the subscription. Unlikeinvoke(BiConsumer)
, the callback does not receive the failure or cancellation details.- Parameters:
action
- the action to execute when the streams completes, fails or the subscription gets cancelled. Must not benull
.- Returns:
- the new
Multi
-
call
@CheckReturnValue public Multi<T> call(java.util.function.BiFunction<java.lang.Throwable,java.lang.Boolean,Uni<?>> mapper)
Attaches an action that is executed when theMulti
emits a completion or a failure or when the subscriber cancels the subscription.
-
-