T - the type of item emitted by the UniUni instead, e.g. Uni.onItem() or Uni.onTermination().@Deprecated public class UniOnEvent<T> extends Object
Uni or by
a UniSubscriber| Constructor and Description |
|---|
UniOnEvent(Uni<T> upstream)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
UniOnCancel<T> |
cancellation()
Deprecated.
Use
Uni.onCancellation() )} instead |
Uni<T> |
cancellation(Runnable runnable)
Deprecated.
Use
Uni.onCancellation() instead. |
UniOnFailure<T> |
failure()
Deprecated.
Use
Uni.onFailure() instead |
UniOnFailure<T> |
failure(Class<? extends Throwable> typeOfFailure)
Deprecated.
Use
Uni.onFailure(Class) )} instead |
UniOnFailure<T> |
failure(Predicate<? super Throwable> predicate)
Deprecated.
Use
Uni.onFailure(Predicate) )} instead |
UniOnItem<T> |
item()
Deprecated.
Use
Uni.onItem() instead |
UniOnItemOrFailure<T> |
itemOrFailure()
Deprecated.
Use
Uni.onItemOrFailure() )} instead |
UniOnSubscribe<T> |
subscribe()
Deprecated.
Use
Uni.onSubscribe() )} instead |
Uni<T> |
subscribed(Consumer<? super UniSubscription> consumer)
Deprecated.
Uni
Uni.onSubscribe() instead. |
UniOnTerminate<T> |
termination()
Deprecated.
Use
Uni.onTermination() )} instead |
Uni<T> |
termination(Functions.TriConsumer<T,Throwable,Boolean> consumer)
Deprecated.
Use
uni.onTermination().invoke(...) instead |
Uni<T> |
termination(Runnable action)
Deprecated.
Use
uni.onTermination().invoke(...) instead |
@Deprecated public Uni<T> subscribed(Consumer<? super UniSubscription> consumer)
Uni.onSubscribe() instead.Uni has received a UniSubscription 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.
consumer - the callback, must not be nullUni@Deprecated public Uni<T> cancellation(Runnable runnable)
Uni.onCancellation() instead.runnable - the callback, must not be nullUni@Deprecated public Uni<T> termination(Functions.TriConsumer<T,Throwable,Boolean> consumer)
uni.onTermination().invoke(...) insteadUni emits an item or a failure or when the subscriber
cancels the subscription.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 be null in this case). Must not
be null If the second parameter (the failure) is not null, the first is
necessary null and the third is necessary false as it indicates a termination
due to a failure.Uni@Deprecated public Uni<T> termination(Runnable action)
uni.onTermination().invoke(...) insteadUni emits an item or a failure or when the subscriber
cancels the subscription. Unlike termination(Functions.TriConsumer), the callback does not receive
the item, failure or cancellation.action - the action to run, must not be nullUni@Deprecated public UniOnItem<T> item()
Uni.onItem() insteadUni emits the item (potentially null).
Examples:
Uni<T> uni = ...;
uni.onItem().transform(x -> ...); // Transform the item into another item (~ map)
uni.onItem().transformToUni(x -> ...); // Transform the item into a Uni (~ flatMap)
Uni.ifNoItem()@Deprecated public UniOnFailure<T> failure()
Uni.onFailure() insteadfailure(Predicate) but applied to all failures fired by the upstream uni.
It allows configuring the on failure behavior (recovery, retry...).@Deprecated public UniOnFailure<T> failure(Predicate<? super Throwable> predicate)
Uni.onFailure(Predicate) )} insteadUniOnFailure) is applied.
For instance, to only when an IOException is fired as failure you can use:
uni.onFailure(IOException.class).recoverWithItem("hello")
The fallback value (hello) will only be used if the upstream uni fire a failure of type
IOException.*
predicate - the predicate, null means applied to all failures@Deprecated public UniOnFailure<T> failure(Class<? extends Throwable> typeOfFailure)
Uni.onFailure(Class) )} insteadUniOnFailure) is applied.
For instance, to only when an IOException is fired as failure you can use:
uni.onFailure(IOException.class).recoverWithItem("hello")
The fallback value (hello) will only be used if the upstream uni fire a failure of type
IOException.*
typeOfFailure - the class of exception, must not be null@Deprecated public UniOnCancel<T> cancellation()
Uni.onCancellation() )} instead@Deprecated public UniOnSubscribe<T> subscribe()
Uni.onSubscribe() )} instead@Deprecated public UniOnTerminate<T> termination()
Uni.onTermination() )} insteadUni terminates on either an item, a failure or a cancellation.@Deprecated public UniOnItemOrFailure<T> itemOrFailure()
Uni.onItemOrFailure() )} insteadCopyright © 2019–2020 SmallRye. All rights reserved.