Top Inners Fields Constructors Methods
io.rsocket.core

pack-priv Class ResolvingOperator<T>

extends Object
implements Disposable
Class Inheritance
All Implemented Interfaces
reactor.core.Disposable
Known Direct Subclasses
io.rsocket.core.DefaultRSocketClient, io.rsocket.core.ReconnectMono.ResolvingInner
Imports
java.time.Duration, java.util.concurrent.CancellationException, java.util.concurrent.atomic.AtomicIntegerFieldUpdater, .AtomicLongFieldUpdater, .AtomicReferenceFieldUpdater, java.util.function.BiConsumer, org.reactivestreams.Subscription, reactor.core.CoreSubscriber, .Disposable, .Exceptions, .Scannable, reactor.core.publisher.Operators, reactor.util.annotation.Nullable, reactor.util.context.Context

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv abstract static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv static final int
pack-priv static final BiConsumer<?, Throwable>[]
pack-priv static final BiConsumer<?, Throwable>[]
pack-priv static final CancellationException
pack-priv static final BiConsumer<?, Throwable>[]
pack-priv static final int
pack-priv volatile BiConsumer<T, Throwable>[]
pack-priv static final AtomicReferenceFieldUpdater<ResolvingOperator<T>, BiConsumer<T, U>[]>
pack-priv Throwable
t

pack-priv static final BiConsumer<?, Throwable>[]
pack-priv static final int
pack-priv T
pack-priv volatile int
pack-priv static final AtomicIntegerFieldUpdater<ResolvingOperator<T>>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv final int
public T

Returns:

the value of this ResolvingOperator or null if the timeout is reached and the ResolvingOperator has not completed
block
(Duration
the timeout value as a Duration
timeout
)

Block the calling thread for the specified time, waiting for the completion of this ReconnectMono.

pack-priv final void
complete(T value)

public final boolean
public final void
dispose()

Implements reactor.core.Disposable.dispose.

Cancel or dispose the underlying task or resource.
pack-priv final void
protected void
protected void
protected void
protected void
pack-priv final void
public final boolean
isDisposed()

Overrides default reactor.core.Disposable.isDisposed.

Optionally return true when the resource or task is disposed.
public final boolean
pack-priv final void
pack-priv final void
pack-priv final void
public final T
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ADDED_STATEback to summary
pack-priv static final int ADDED_STATE
EMPTY_SUBSCRIBEDback to summary
pack-priv static final BiConsumer<?, Throwable>[] EMPTY_SUBSCRIBED
Annotations
@SuppressWarnings:unchecked
EMPTY_UNSUBSCRIBEDback to summary
pack-priv static final BiConsumer<?, Throwable>[] EMPTY_UNSUBSCRIBED
Annotations
@SuppressWarnings:unchecked
ON_DISPOSEback to summary
pack-priv static final CancellationException ON_DISPOSE
READYback to summary
pack-priv static final BiConsumer<?, Throwable>[] READY
Annotations
@SuppressWarnings:unchecked
READY_STATEback to summary
pack-priv static final int READY_STATE
subscribersback to summary
pack-priv volatile BiConsumer<T, Throwable>[] subscribers
SUBSCRIBERSback to summary
pack-priv static final AtomicReferenceFieldUpdater<ResolvingOperator<T>, BiConsumer<T, U>[]> SUBSCRIBERS
Annotations
@SuppressWarnings:rawtypes
tback to summary
pack-priv Throwable t
TERMINATEDback to summary
pack-priv static final BiConsumer<?, Throwable>[] TERMINATED
Annotations
@SuppressWarnings:unchecked
TERMINATED_STATEback to summary
pack-priv static final int TERMINATED_STATE
valueback to summary
pack-priv T value
wipback to summary
pack-priv volatile int wip
WIPback to summary
pack-priv static final AtomicIntegerFieldUpdater<ResolvingOperator<T>> WIP
Annotations
@SuppressWarnings:rawtypes

Constructor Detail

ResolvingOperatorback to summary
public ResolvingOperator()

Method Detail

addback to summary
pack-priv final int add(BiConsumer<T, Throwable> ps)
blockback to summary
public T block(Duration timeout)

Block the calling thread for the specified time, waiting for the completion of this ReconnectMono. If the ResolvingOperator is completed with an error a RuntimeException that wraps the error is thrown.

Parameters
timeout:Duration

the timeout value as a Duration

Returns:T

the value of this ResolvingOperator or null if the timeout is reached and the ResolvingOperator has not completed

Annotations
@Nullable
@SuppressWarnings:uncheked, BusyWait
Exceptions
RuntimeException:
if terminated with error
IllegalStateException:
if timed out or Thread was interrupted with InterruptedException
completeback to summary
pack-priv final void complete(T value)
connectback to summary
public final boolean connect()
disposeback to summary
public final void dispose()

Implements reactor.core.Disposable.dispose.

Doc from reactor.core.Disposable.dispose.

Cancel or dispose the underlying task or resource.

Implementations are required to make this method idempotent.

Annotations
@Override
doFinallyback to summary
pack-priv final void doFinally()
doOnDisposeback to summary
protected void doOnDispose()
doOnValueExpiredback to summary
protected void doOnValueExpired(T value)
doOnValueResolvedback to summary
protected void doOnValueResolved(T value)
doSubscribeback to summary
protected void doSubscribe()
invalidateback to summary
pack-priv final void invalidate()
isDisposedback to summary
public final boolean isDisposed()

Overrides default reactor.core.Disposable.isDisposed.

Doc from reactor.core.Disposable.isDisposed.

Optionally return true when the resource or task is disposed.

Implementations are not required to track disposition and as such may never return true even when disposed. However, they MUST only return true when there's a guarantee the resource or task is disposed.

Returns:boolean

true when there's a guarantee the resource or task is disposed.

Annotations
@Override
isPendingback to summary
public final boolean isPending()
observeback to summary
pack-priv final void observe(BiConsumer<T, Throwable> actual)
removeback to summary
pack-priv final void remove(BiConsumer<T, Throwable> ps)
Annotations
@SuppressWarnings:unchecked
terminateback to summary
pack-priv final void terminate(Throwable t)
Annotations
@SuppressWarnings:unchecked
valueIfResolvedback to summary
public final T valueIfResolved()
Annotations
@Nullable
io.rsocket.core back to summary

pack-priv abstract Class ResolvingOperator.DeferredResolution<T, R>

extends Object
implements CoreSubscriber<T>, Subscription, Scannable, BiConsumer<R, Throwable>
Class Inheritance
All Implemented Interfaces
java.util.function.BiConsumer, reactor.core.Scannable, org.reactivestreams.Subscription, reactor.core.CoreSubscriber, org.reactivestreams.Subscriber
Known Direct Subclasses
io.rsocket.core.DefaultRSocketClient.FlattingInner, io.rsocket.core.DefaultRSocketClient.RequestChannelInner

Field Summary

Modifier and TypeField and Description
pack-priv final CoreSubscriber<? super T>
pack-priv boolean
pack-priv final ResolvingOperator<R>
pack-priv volatile long
pack-priv static final AtomicLongFieldUpdater<ResolvingOperator.DeferredResolution<T, R>>
pack-priv Subscription
s

pack-priv static final long
pack-priv static final long

Constructor Summary

AccessConstructor and Description
pack-priv
DeferredResolution(ResolvingOperator<R> parent, CoreSubscriber<? super T> actual)

Method Summary

Modifier and TypeMethod and Description
public void
cancel()

Implements org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.
public final Context
currentContext()

Overrides default reactor.core.CoreSubscriber.currentContext.

Request a Context from dependent components which can include downstream operators during subscribing or a terminal org.reactivestreams.Subscriber.
public boolean
public final void
onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

Successful terminal state.
public final void
onError(Throwable
the throwable signaled
t
)

Implements org.reactivestreams.Subscriber.onError.

Failed terminal state.
public final void
onNext(T
the element signaled
payload
)

Implements org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).
public final void
onSubscribe(Subscription
the Subscription that allows requesting data via Subscription#request(long)
s
)

Implements reactor.core.CoreSubscriber.onSubscribe.

Implementors should initialize any state used by onNext(Object) before calling Subscription#request(long).
public void
request(long
the strictly positive number of elements to requests to the upstream Publisher
n
)

Implements org.reactivestreams.Subscription.request.

No events will be sent by a Publisher until demand is signaled via this method.
public Object
scanUnsafe(Scannable.Attr<T>
a Attr to resolve for the component.
key
)

Implements reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

actualback to summary
pack-priv final CoreSubscriber<? super T> actual
doneback to summary
pack-priv boolean done
parentback to summary
pack-priv final ResolvingOperator<R> parent
requestedback to summary
pack-priv volatile long requested
REQUESTEDback to summary
pack-priv static final AtomicLongFieldUpdater<ResolvingOperator.DeferredResolution<T, R>> REQUESTED
Annotations
@SuppressWarnings:rawtypes
sback to summary
pack-priv Subscription s
STATE_CANCELLEDback to summary
pack-priv static final long STATE_CANCELLED
STATE_SUBSCRIBEDback to summary
pack-priv static final long STATE_SUBSCRIBED

Constructor Detail

DeferredResolutionback to summary
pack-priv DeferredResolution(ResolvingOperator<R> parent, CoreSubscriber<? super T> actual)

Method Detail

cancelback to summary
public void cancel()

Implements org.reactivestreams.Subscription.cancel.

Doc from org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.

Data may still be sent to meet previously signalled demand after calling cancel.

currentContextback to summary
public final Context currentContext()

Overrides default reactor.core.CoreSubscriber.currentContext.

Doc from reactor.core.CoreSubscriber.currentContext.

Request a Context from dependent components which can include downstream operators during subscribing or a terminal org.reactivestreams.Subscriber.

Returns:Context

a resolved context or Context#empty()

Annotations
@Override
isCancelledback to summary
public boolean isCancelled()
onCompleteback to summary
public final void onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

Doc from org.reactivestreams.Subscriber.onComplete.

Successful terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Annotations
@Override
onErrorback to summary
public final void onError(Throwable t)

Implements org.reactivestreams.Subscriber.onError.

Doc from org.reactivestreams.Subscriber.onError.

Failed terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Parameters
t:Throwable

the throwable signaled

Annotations
@Override
onNextback to summary
public final void onNext(T payload)

Implements org.reactivestreams.Subscriber.onNext.

Doc from org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).

Parameters
payload:T

the element signaled

Annotations
@Override
onSubscribeback to summary
public final void onSubscribe(Subscription s)

Implements reactor.core.CoreSubscriber.onSubscribe.

Doc from reactor.core.CoreSubscriber.onSubscribe.

Implementors should initialize any state used by onNext(Object) before calling Subscription#request(long). Should further onNext related state modification occur, thread-safety will be required.

Note that an invalid request <= 0 will not produce an onError and will simply be ignored or reported through a debug-enabled reactor.util.Logger. Invoked after calling Publisher#subscribe(Subscriber).

No data will start flowing until Subscription#request(long) is invoked.

It is the responsibility of this Subscriber instance to call Subscription#request(long) whenever more data is wanted.

The Publisher will send notifications only in response to Subscription#request(long).

Parameters
s:Subscription

Doc from org.reactivestreams.Subscriber.onSubscribe.

the Subscription that allows requesting data via Subscription#request(long)

Annotations
@Override
requestback to summary
public void request(long n)

Implements org.reactivestreams.Subscription.request.

Doc from org.reactivestreams.Subscription.request.

No events will be sent by a Publisher until demand is signaled via this method.

It can be called however often and whenever needed—but if the outstanding cumulative demand ever becomes Long.MAX_VALUE or more, it may be treated by the Publisher as "effectively unbounded".

Whatever has been requested can be sent by the Publisher so only signal demand for what can be safely handled.

A Publisher can send less than is requested if the stream ends but then must emit either Subscriber#onError(Throwable) or Subscriber#onComplete().

Parameters
n:long

the strictly positive number of elements to requests to the upstream Publisher

Annotations
@Override
scanUnsafeback to summary
public Object scanUnsafe(Scannable.Attr<T> key)

Implements reactor.core.Scannable.scanUnsafe.

Doc from reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place. Although it is ignoring the generic type of the Attr key, implementors should take care to return values of the correct type, and return null if no specific value is available.

For public consumption of attributes, prefer using scan(Attr), which will return a typed value and fall back to the key's default if the component didn't define any mapping.

Parameters
key:Scannable.Attr<T>

a Attr to resolve for the component.

Returns:Object

the value associated to the key for that specific component, or null if none.

Annotations
@Nullable
@Override
io.rsocket.core back to summary

pack-priv Class ResolvingOperator.MonoDeferredResolutionOperator<T>

extends Operators.MonoSubscriber<T, T>
implements BiConsumer<T, Throwable>
Class Inheritance
All Implemented Interfaces
java.util.function.BiConsumer

Field Summary

Modifier and TypeField and Description
pack-priv final ResolvingOperator<T>
Inherited from reactor.core.publisher.Operators.MonoSubscriber:
actualvalue

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
accept(T
the first input argument
t
,
Throwable
the second input argument
throwable
)

Implements java.util.function.BiConsumer.accept.

Performs this operation on the given arguments.
public void
cancel()

Overrides reactor.core.publisher.Operators.MonoSubscriber.cancel.

Implements org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.
public void
public void
onError(Throwable
the throwable signaled
t
)

Overrides reactor.core.publisher.Operators.MonoSubscriber.onError.

Implements org.reactivestreams.Subscriber.onError.

Failed terminal state.
public Object
scanUnsafe(Scannable.Attr<T>
a Attr to resolve for the component.
key
)

Overrides reactor.core.publisher.Operators.MonoSubscriber.scanUnsafe.

Overrides default reactor.core.publisher.InnerProducer.scanUnsafe.

Implements reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place.
Inherited from reactor.core.publisher.Operators.MonoSubscriber:
actualclearcompletediscardisCancelledisEmptyonNextonSubscribepollrequestrequestFusionsetValuesize

Field Detail

parentback to summary
pack-priv final ResolvingOperator<T> parent

Constructor Detail

MonoDeferredResolutionOperatorback to summary
pack-priv MonoDeferredResolutionOperator(ResolvingOperator<T> parent, CoreSubscriber<? super T> actual)

Method Detail

acceptback to summary
public void accept(T t, Throwable throwable)

Implements java.util.function.BiConsumer.accept.

Doc from java.util.function.BiConsumer.accept.

Performs this operation on the given arguments.

Parameters
t:T

the first input argument

throwable:Throwable

the second input argument

Annotations
@Override
cancelback to summary
public void cancel()

Overrides reactor.core.publisher.Operators.MonoSubscriber.cancel.

Implements org.reactivestreams.Subscription.cancel.

Doc from org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.

Data may still be sent to meet previously signalled demand after calling cancel.

Annotations
@Override
onCompleteback to summary
public void onComplete()

Overrides reactor.core.publisher.Operators.MonoSubscriber.onComplete.

Implements org.reactivestreams.Subscriber.onComplete.

Doc from org.reactivestreams.Subscriber.onComplete.

Successful terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Annotations
@Override
onErrorback to summary
public void onError(Throwable t)

Overrides reactor.core.publisher.Operators.MonoSubscriber.onError.

Implements org.reactivestreams.Subscriber.onError.

Doc from org.reactivestreams.Subscriber.onError.

Failed terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Parameters
t:Throwable

the throwable signaled

Annotations
@Override
scanUnsafeback to summary
public Object scanUnsafe(Scannable.Attr<T> key)

Overrides reactor.core.publisher.Operators.MonoSubscriber.scanUnsafe.

Overrides default reactor.core.publisher.InnerProducer.scanUnsafe.

Implements reactor.core.Scannable.scanUnsafe.

Doc from reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place. Although it is ignoring the generic type of the Attr key, implementors should take care to return values of the correct type, and return null if no specific value is available.

For public consumption of attributes, prefer using scan(Attr), which will return a typed value and fall back to the key's default if the component didn't define any mapping.

Parameters
key:Scannable.Attr<T>

a Attr to resolve for the component.

Returns:Object

the value associated to the key for that specific component, or null if none.

Annotations
@Override