public static class Subscribers.CallbackBasedSubscriber<T> extends Object implements CancellableSubscriber<T>, org.reactivestreams.Subscription
| Constructor and Description |
|---|
CallbackBasedSubscriber(Consumer<? super T> onItem,
Consumer<? super Throwable> onFailure,
Runnable onCompletion,
Consumer<? super org.reactivestreams.Subscription> onSubscription) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Runs the cancellation action.
|
void |
onCompletion()
Method called when the upstream emits a
completion terminal event. |
void |
onFailure(Throwable t)
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). |
void |
onSubscribe(org.reactivestreams.Subscription s) |
void |
request(long n) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonComplete, onError, onNextpublic void onSubscribe(org.reactivestreams.Subscription s)
onSubscribe in interface org.reactivestreams.Subscriber<T>public void onItem(T item)
MultiSubscriberitem event, in response to to requests to
Subscription.request(long).onItem in interface MultiSubscriber<T>item - the item, must not be null.public void onFailure(Throwable t)
MultiSubscriberfailure terminal event.
No further events will be sent even if Subscription.request(long) is invoked again.
onFailure in interface MultiSubscriber<T>t - the failure, must not be null.public void onCompletion()
MultiSubscribercompletion terminal event.
No further events will be sent even if Subscription.request(long) is invoked again.
onCompletion in interface MultiSubscriber<T>public void request(long n)
request in interface org.reactivestreams.Subscriptionpublic void cancel()
Cancellablecancel in interface Cancellablecancel in interface org.reactivestreams.SubscriptionCopyright © 2019–2020 SmallRye. All rights reserved.