java.lang.Object
io.smallrye.mutiny.groups.UniOnTerminate<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAttaches an action that is executed when theUniemits an item or a failure or when the subscriber cancels the subscription.Attaches an action that is executed when theUniemits an item or a failure or when the subscriber cancels the subscription.invoke(Functions.TriConsumer<T, Throwable, Boolean> consumer) Attaches an action that is executed when theUniemits an item or a failure or when the subscriber cancels the subscription.Attaches an action that is executed when theUniemits an item or a failure or when the subscriber cancels the subscription.
-
Constructor Details
-
UniOnTerminate
-
-
Method Details
-
invoke
Attaches an action that is executed when theUniemits an item or a failure or when the subscriber cancels the subscription.- Parameters:
consumer- the consumer receiving the item, the failure and a boolean indicating whether the termination is due to a cancellation (the 2 first parameters would benullin this case). Must not benullIf the second parameter (the failure) is notnull, the first is necessarynulland the third is necessaryfalseas it indicates a termination due to a failure.- Returns:
- the new
Uni
-
invoke
Attaches an action that is executed when theUniemits an item or a failure or when the subscriber cancels the subscription. Unlikeinvoke(Functions.TriConsumer)(Functions.TriConsumer)}, the callback does not receive the item, failure or cancellation.- Parameters:
action- the action to run, must not benull- Returns:
- the new
Uni
-
call
@CheckReturnValue public Uni<T> call(Functions.Function3<? super T, Throwable, Boolean, Uni<?>> mapper) Attaches an action that is executed when theUniemits an item or a failure or when the subscriber cancels the subscription.- Parameters:
mapper- the function receiving the item, the failure and a boolean indicating whether the termination is due to a cancellation. When an item is emitted then the failure isnulland the boolean isfalse. When a failure is emitted then the item isnulland the boolean isfalse. When the subscription has been cancelled then the boolean istrueand the other parameters arenull. The function must return a non-nullUni.- Returns:
- the new
Uni
-
call
Attaches an action that is executed when theUniemits an item or a failure or when the subscriber cancels the subscription. Unlikecall(Functions.Function3)the supplier does not receive the item, failure or cancellation.
-