Add call to MultiOnCompletion and deprecated invokeUni
@@ -42,8 +42,21 @@ public class MultiOnCompletion<T> {
*
* @param supplier the supplier, must return a non-{@code null} {@link Uni}
* @return the new {@link Multi}
+ * @deprecated Use {@link #call(Supplier)}
*/
+ @Deprecated
public Multi<T> invokeUni(Supplier<Uni<?>> supplier) {
+ return call(supplier);
+ }
+
+ /**
+ * Creates a new {@link Multi} executing the given {@link Uni} action when this {@link Multi} completes.
+ * The completion notification is sent downstream when the {@link Uni} has completed.
+ *
+ * @param supplier the supplier, must return a non-{@code null} {@link Uni}
+ * @return the new {@link Multi}
+ */
+ public Multi<T> call(Supplier<Uni<?>> supplier) {
return Infrastructure.onMultiCreation(new MultiOnCompletionInvokeUni<>(upstream, supplier));
}
