T - the type of item.public interface MultiSubscriber<T>
extends org.reactivestreams.Subscriber<T>
Subscriber receiving calls to Subscriber.onSubscribe(Subscription) once after passing an instance of
Subscriber to Publisher.subscribe(Subscriber).
No further events will be received until Subscription.request(long) is called.
After signaling demand:
onItem(Object) up to the maximum number defined by
Subscription.request(long)onFailure(Throwable) or onCompletion() which signals a terminal state after which
no further events will be sent.
Demand can be signaled via Subscription.request(long) whenever the Subscriber instance is capable of handling
more.
This interface bridges the Mutiny model and the Reactive Streams model.
| Modifier and Type | Method and Description |
|---|---|
default void |
onComplete()
Successful terminal state.
|
void |
onCompletion()
Method called when the upstream emits a
completion terminal event. |
default void |
onError(Throwable t)
Failed terminal state.
|
void |
onFailure(Throwable failure)
Method called when the upstream emits a
failure terminal event. |
void |
onItem(T item)
Method called when the upstream emits an
item event, in response to to requests to
Subscription.request(long). |
default void |
onNext(T t)
Data notification sent by the
Publisher in response to requests to Subscription.request(long). |
void onItem(T item)
item event, in response to to requests to
Subscription.request(long).item - the item, must not be null.void onFailure(Throwable failure)
failure terminal event.
No further events will be sent even if Subscription.request(long) is invoked again.
failure - the failure, must not be null.void onCompletion()
completion terminal event.
No further events will be sent even if Subscription.request(long) is invoked again.
default void onNext(T t)
Publisher in response to requests to Subscription.request(long).
Delegates to onItem(Object)onNext in interface org.reactivestreams.Subscriber<T>t - the element signaleddefault void onError(Throwable t)
No further events will be sent even if Subscription.request(long) is invoked again.
Delegates to onFailure(Throwable)
onError in interface org.reactivestreams.Subscriber<T>t - the throwable signaleddefault void onComplete()
No further events will be sent even if Subscription.request(long) is invoked again.
Delegates to onCompletion()
onComplete in interface org.reactivestreams.Subscriber<T>Copyright © 2019–2020 SmallRye. All rights reserved.