T - the type of item emitted by the MultiMulti, e.g. Multi.onItem() or Multi.onSubscribe() instead@Deprecated public class MultiOnEvent<T> extends Object
Multi or by
a Subscriber| Constructor and Description |
|---|
MultiOnEvent(Multi<T> upstream)
Deprecated.
|
@Deprecated public Multi<T> subscribed(Consumer<? super org.reactivestreams.Subscription> callback)
Multi.onSubscribe()Multi has received a Subscription from upstream.
The downstream does not have received the subscription yet. It will be done once the action completes.
This method is not intended to cancel the subscription. It's the responsibility of the subscriber to do so.
callback - the callback, must not be nullMulti@Deprecated public Multi<T> cancellation(Runnable callback)
Multi.onCancellation() instead.callback - the callback, must not be nullMulti@Deprecated public Multi<T> request(LongConsumer callback)
Multi.onRequest() insteadcallback - the actionMulti@Deprecated public MultiOverflow<T> overflow()
@Deprecated public Multi<T> termination(BiConsumer<Throwable,Boolean> callback)
Multi.onTermination()}Multi emits a completion or a failure or when the subscriber
cancels the subscription.callback - the consumer receiving the failure if any and a boolean indicating whether the termination
is due to a cancellation (the failure parameter would be null in this case). Must not
be null.Multi@Deprecated public Multi<T> termination(Runnable action)
Multi.onTermination()}Multi emits a completion or a failure or when the subscriber
cancels the subscription. Unlike termination(BiConsumer), the callback does not receive the failure or
cancellation details.action - the action to execute when the streams completes, fails or the subscription gets cancelled. Must
not be null.Multi@Deprecated public MultiOnItem<T> item()
Multi.onItem() insteadMulti emits an item.
Examples:
Multi<T> multi = ...;
multi.onItem().apply(x -> ...); // Map to another item
multi.onItem().mapToMulti(x -> ...); // Map to a multi
@Deprecated public MultiOnFailure<T> failure()
Multi.onFailure() insteadfailure(Predicate) but applied to all failures fired by the upstream multi.
It allows configuring the on failure behavior (recovery, retry...).@Deprecated public MultiOnCompletion<T> completion()
Multi.onCompletion() insteadMulti emits the completion event.@Deprecated public MultiOnFailure<T> failure(Predicate<? super Throwable> predicate)
Multi.onFailure(Predicate) insteadMultiOnFailure) is applied.
For instance, to only when an IOException is fired as failure you can use:
multi.onFailure(IOException.class).recoverWithItem("hello")
The fallback value (hello) will only be used if the upstream multi fires a failure of type
IOException.
predicate - the predicate, null means applied to all failures@Deprecated public MultiOnFailure<T> failure(Class<? extends Throwable> typeOfFailure)
Multi.onFailure(Class) insteadMultiOnFailure) is applied.
For instance, to only when an IOException is fired as failure you can use:
multi.onFailure(IOException.class).recoverWithItem("hello")
The fallback value (hello) will only be used if the upstream multi fire a failure of type
IOException.*
typeOfFailure - the class of exception, must not be null@Deprecated public Multi<T> completion(Runnable callback)
Multi.onCompletion() insteadMulti completes.callback - the callback, must not be nullMulti@Deprecated public MultiOnSubscribe<T> subscribe()
Multi.onSubscribe() instead@Deprecated public MultiOnCancel<T> cancellation()
Multi.onCancellation() instead@Deprecated public MultiOnTerminate<T> termination()
Multi.onTermination() insteadMulti terminates on either a completion, a failure or a cancellation.@Deprecated public MultiOnRequest<T> request()
Multi.onRequest() insteadCopyright © 2019–2020 SmallRye. All rights reserved.