Top Fields Constructors Methods
io.rsocket.core

pack-priv final Class RequestStreamResponderSubscriber

extends Object
implements ResponderFrameHandler, CoreSubscriber<Payload>
Class Inheritance
All Implemented Interfaces
reactor.core.CoreSubscriber, org.reactivestreams.Subscriber, io.rsocket.core.ResponderFrameHandler, io.rsocket.core.FrameHandler
Static Imports
io.rsocket.core.PayloadValidationUtils.INVALID_PAYLOAD_ERROR_MESSAGE, .PayloadValidationUtils.isValid, .SendUtils.sendReleasingPayload

Field Summary

Modifier and TypeField and Description
pack-priv final ByteBufAllocator
pack-priv final DuplexConnection
pack-priv boolean
pack-priv final long
pack-priv CompositeByteBuf
pack-priv final RSocket
pack-priv static final Logger
pack-priv final int
pack-priv final int
pack-priv final int
pack-priv final PayloadDecoder
pack-priv final RequesterResponderSupport
pack-priv final RequestInterceptor
pack-priv volatile Subscription
s

pack-priv static final AtomicReferenceFieldUpdater<RequestStreamResponderSubscriber, Subscription>
S

pack-priv final int

Constructor Summary

AccessConstructor and Description
public
RequestStreamResponderSubscriber(int streamId, long firstRequest, ByteBuf firstFrame, RequesterResponderSupport requesterResponderSupport, RSocket handler)

public
RequestStreamResponderSubscriber(int streamId, long firstRequest, RequesterResponderSupport requesterResponderSupport)

Method Summary

Modifier and TypeMethod and Description
public 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 final void
public void
handleNext(ByteBuf followingFrame, boolean hasFollows, boolean isLastPayload)

Implements io.rsocket.core.FrameHandler.handleNext.

public void
public void
onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

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

Implements org.reactivestreams.Subscriber.onError.

Failed terminal state.
public void
onNext(Payload
the element signaled
p
)

Implements org.reactivestreams.Subscriber.onNext.

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

Implements reactor.core.CoreSubscriber.onSubscribe.

Implementors should initialize any state used by onNext(Object) before calling Subscription#request(long).
pack-priv boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

allocatorback to summary
pack-priv final ByteBufAllocator allocator
connectionback to summary
pack-priv final DuplexConnection connection
doneback to summary
pack-priv boolean done
firstRequestback to summary
pack-priv final long firstRequest
framesback to summary
pack-priv CompositeByteBuf frames
handlerback to summary
pack-priv final RSocket handler
loggerback to summary
pack-priv static final Logger logger

Hides io.rsocket.core.ResponderFrameHandler.logger.

maxFrameLengthback to summary
pack-priv final int maxFrameLength
maxInboundPayloadSizeback to summary
pack-priv final int maxInboundPayloadSize
mtuback to summary
pack-priv final int mtu
payloadDecoderback to summary
pack-priv final PayloadDecoder payloadDecoder
requesterResponderSupportback to summary
pack-priv final RequesterResponderSupport requesterResponderSupport
requestInterceptorback to summary
pack-priv final RequestInterceptor requestInterceptor
Annotations
@Nullable
sback to summary
pack-priv volatile Subscription s
Sback to summary
pack-priv static final AtomicReferenceFieldUpdater<RequestStreamResponderSubscriber, Subscription> S
streamIdback to summary
pack-priv final int streamId

Constructor Detail

RequestStreamResponderSubscriberback to summary
public RequestStreamResponderSubscriber(int streamId, long firstRequest, ByteBuf firstFrame, RequesterResponderSupport requesterResponderSupport, RSocket handler)
RequestStreamResponderSubscriberback to summary
public RequestStreamResponderSubscriber(int streamId, long firstRequest, RequesterResponderSupport requesterResponderSupport)

Method Detail

currentContextback to summary
public 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
handleCancelback to summary
public final void handleCancel()

Implements io.rsocket.core.FrameHandler.handleCancel.

Annotations
@Override
handleNextback to summary
public void handleNext(ByteBuf followingFrame, boolean hasFollows, boolean isLastPayload)

Implements io.rsocket.core.FrameHandler.handleNext.

Annotations
@Override
handleRequestNback to summary
public void handleRequestN(long n)

Overrides default io.rsocket.core.ResponderFrameHandler.handleRequestN.

Annotations
@Override
onCompleteback to summary
public 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 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 void onNext(Payload p)

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
p:Payload

the element signaled

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

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
subscription:Subscription

Doc from org.reactivestreams.Subscriber.onSubscribe.

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

Annotations
@Override
tryTerminateOnErrorback to summary
pack-priv boolean tryTerminateOnError()