T - public abstract class ResilienceBaseSubscriber<T>
extends java.lang.Object
implements reactor.core.CoreSubscriber<T>, org.reactivestreams.Subscription, reactor.core.Disposable
BaseSubscriber| Modifier and Type | Field and Description |
|---|---|
protected reactor.core.CoreSubscriber<? super T> |
actual |
| Modifier | Constructor and Description |
|---|---|
protected |
ResilienceBaseSubscriber(reactor.core.CoreSubscriber<? super T> actual) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
acquireCallPermit() |
void |
cancel() |
reactor.util.context.Context |
currentContext() |
void |
dispose()
Dispose the Subscription by
cancelling it. |
protected abstract java.lang.Throwable |
getThrowable() |
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(java.lang.Throwable throwable)
Optional hook for error processing.
|
protected void |
hookOnNext(T value)
Hook for processing of onNext values.
|
protected void |
hookOnPermitAcquired()
Optional hook executed when permit call is acquired.
|
protected void |
hookOnSubscribe(org.reactivestreams.Subscription subscription)
Hook for further processing of onSubscribe's Subscription.
|
protected abstract boolean |
isCallPermitted() |
boolean |
isDisposed() |
protected boolean |
notCancelled() |
void |
onComplete() |
void |
onError(java.lang.Throwable t) |
void |
onNext(T value) |
void |
onSubscribe(org.reactivestreams.Subscription s) |
void |
request(long n) |
void |
requestUnbounded()
Request an unbounded amount. |
java.lang.String |
toString() |
protected org.reactivestreams.Subscription |
upstream()
Return current
Subscription |
protected boolean |
wasCallPermitted() |
protected final reactor.core.CoreSubscriber<? super T> actual
protected ResilienceBaseSubscriber(reactor.core.CoreSubscriber<? super T> actual)
@Nullable 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.Disposablepublic reactor.util.context.Context currentContext()
currentContext in interface reactor.core.CoreSubscriber<T>protected boolean notCancelled()
protected void hookOnSubscribe(org.reactivestreams.Subscription subscription)
subscription - the subscription to optionally processprotected void hookOnNext(T value)
request(long) here
to further request data from the source Publisher if
the initial request wasn't unbounded.
Defaults to doing nothing.
value - the emitted value to processprotected void hookOnComplete()
protected void hookOnError(java.lang.Throwable throwable)
Exceptions.errorCallbackNotImplemented(Throwable).throwable - the error to processprotected void hookOnCancel()
cancel() method. Defaults to doing nothing.protected 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)protected void hookOnPermitAcquired()
protected abstract boolean isCallPermitted()
protected boolean acquireCallPermit()
protected boolean wasCallPermitted()
protected abstract java.lang.Throwable getThrowable()
public final void onSubscribe(org.reactivestreams.Subscription s)
public final void onNext(T value)
onNext in interface org.reactivestreams.Subscriber<T>public final void onError(java.lang.Throwable t)
onError in interface org.reactivestreams.Subscriber<T>public final 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.Subscriptionpublic java.lang.String toString()
toString in class java.lang.Object