public interface UniInterceptor
| Modifier and Type | Method and Description |
|---|---|
default <T> UniSubscriber<? super T> |
onSubscription(Uni<T> instance,
UniSubscriber<? super T> subscriber)
Method called when a subscriber subscribes to a
Uni. |
default <T> Uni<T> |
onUniCreation(Uni<T> uni)
Method called when a new instance of
Uni is created. |
default int |
ordinal() |
default int ordinal()
default <T> Uni<T> onUniCreation(Uni<T> uni)
Uni is created. If can return a new Uni,
or the passed Uni (default behavior) if the interceptor is not interested by this uni.
One use case for this method is the capture of a context at creation time (when the method is called) and
restored when a subscriber subscribed to the produced uni. It is recommended to extend
AbstractUni to produce a new Uni instance.
T - the type of item produced by the uniuni - the created uninulldefault <T> UniSubscriber<? super T> onSubscription(Uni<T> instance, UniSubscriber<? super T> subscriber)
Uni.
This method lets you substitute the subscriber.T - the type of iteminstance - the instance of unisubscriber - the subscriberCopyright © 2019–2020 SmallRye. All rights reserved.