public class UniDelegatingSubscriber<I,O> extends Object implements UniSubscriber<I>
| Constructor and Description |
|---|
UniDelegatingSubscriber(UniSerializedSubscriber<? super O> subscriber) |
| Modifier and Type | Method and Description |
|---|---|
void |
onFailure(Throwable failure)
Called if the computation of the item by the subscriber
Uni failed. |
void |
onItem(I item)
Event handler called once the item has been computed by the subscribed
Uni. |
void |
onSubscribe(UniSubscription subscription)
Event handler called once the subscribed
Uni has taken into account the subscription. |
public UniDelegatingSubscriber(UniSerializedSubscriber<? super O> subscriber)
public void onSubscribe(UniSubscription subscription)
UniSubscriberUni has taken into account the subscription. The Uni
have triggered the computation of the item.
IMPORTANT: UniSubscriber.onItem(Object) and UniSubscriber.onFailure(Throwable) would not be called
before the invocation of this method.
Uni.runSubscriptionOn(Executor) has been
calledUniSubscriber.onItem(Object) and
UniSubscriber.onFailure(Throwable) won't be calledonSubscribe in interface UniSubscriber<I>subscription - the subscription allowing to cancel the computation.public void onItem(I item)
UniSubscriberUni.
IMPORTANT: this method will be only called once per subscription. If
UniSubscriber.onFailure(Throwable) is called, this method won't be called.
Uni.emitOn(java.util.concurrent.Executor) has been calledonItem in interface UniSubscriber<I>item - the item, may be null.public void onFailure(Throwable failure)
UniSubscriberUni failed.
IMPORTANT: this method will be only called once per subscription. If
UniSubscriber.onItem(Object) is called, this method won't be called.
Uni.emitOn(java.util.concurrent.Executor) has been calledonFailure in interface UniSubscriber<I>failure - the failure, cannot be null.Copyright © 2019–2020 SmallRye. All rights reserved.