public class SentinelReactorSubscriber<T> extends Object
| Constructor and Description |
|---|
SentinelReactorSubscriber(EntryConfig entryConfig,
reactor.core.CoreSubscriber<? super T> actual,
boolean unary) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel() |
reactor.util.context.Context |
currentContext() |
void |
dispose()
Dispose the Subscription by
cancelling it. |
protected void |
hookFinally(reactor.core.publisher.SignalType type)
Optional hook executed after any of the termination events (onError, onComplete,
cancel).
|
protected void |
hookOnCancel()
Optional hook executed when the subscription is cancelled by calling this
Subscriber's
cancel() method. |
protected void |
hookOnComplete()
Optional hook for completion processing.
|
protected void |
hookOnError(Throwable t)
Optional hook for error processing.
|
protected void |
hookOnNext(T value)
Hook for processing of onNext values.
|
protected void |
hookOnSubscribe(org.reactivestreams.Subscription subscription)
Hook for further processing of onSubscribe's Subscription.
|
boolean |
isDisposed() |
void |
onComplete() |
void |
onError(Throwable t) |
void |
onNext(T value) |
void |
onSubscribe(org.reactivestreams.Subscription s) |
void |
request(long n) |
void |
requestUnbounded()
Request an unbounded amount. |
protected boolean |
shouldCallErrorDropHook() |
String |
toString() |
protected org.reactivestreams.Subscription |
upstream()
Return current
Subscription |
public SentinelReactorSubscriber(EntryConfig entryConfig, reactor.core.CoreSubscriber<? super T> actual, boolean unary)
public reactor.util.context.Context currentContext()
protected void hookOnSubscribe(org.reactivestreams.Subscription subscription)
request(long) as an initial request. Values other than the
unbounded Long.MAX_VALUE imply that you'll also call request in
hookOnNext(Object).
Defaults to request unbounded Long.MAX_VALUE as in requestUnbounded()
subscription - the subscription to optionally processprotected void hookOnNext(T value)
request(long) here
to further request data from the source org.reactivestreams.Publisher if
the initial request wasn't unbounded.
Defaults to doing nothing.
value - the emitted value to processprotected void hookOnComplete()
protected boolean shouldCallErrorDropHook()
protected void hookOnError(Throwable t)
Exceptions.errorCallbackNotImplemented(Throwable).t - the error to processprotected void hookOnCancel()
cancel() method. Defaults to doing nothing.protected org.reactivestreams.Subscription upstream()
SubscriptionSubscriptionpublic boolean isDisposed()
isDisposed in interface reactor.core.Disposablepublic void dispose()
Dispose the Subscription by
cancelling it.dispose in interface reactor.core.Disposableprotected void hookFinally(reactor.core.publisher.SignalType type)
hookOnError(Throwable),
hookOnComplete() and hookOnCancel() hooks, even if these callbacks
fail. Defaults to doing nothing. A failure of the callback will be caught by
Operators#onErrorDropped(Throwable, reactor.util.context.Context).type - the type of termination event that triggered the hook
(SignalType.ON_ERROR, SignalType.ON_COMPLETE or
SignalType.CANCEL)public void onSubscribe(org.reactivestreams.Subscription s)
public void onNext(T value)
onNext in interface org.reactivestreams.Subscriber<T>public void onError(Throwable t)
onError in interface org.reactivestreams.Subscriber<T>public void onComplete()
onComplete in interface org.reactivestreams.Subscriber<T>public final void request(long n)
request in interface org.reactivestreams.Subscriptionpublic final void requestUnbounded()
Request an unbounded amount.public final void cancel()
cancel in interface org.reactivestreams.SubscriptionCopyright © 2020 Alibaba Group. All rights reserved.