Top Inners Fields Constructors Methods
io.rsocket.resume

public Class ResumableDuplexConnection

extends Flux<ByteBuf>
implements DuplexConnection, Subscription
Class Inheritance
All Implemented Interfaces
org.reactivestreams.Subscription, io.rsocket.DuplexConnection, io.rsocket.Closeable, reactor.core.Disposable, io.rsocket.Availability
Imports
io.netty.buffer.ByteBuf, .ByteBufAllocator, io.netty.util.CharsetUtil, io.rsocket.DuplexConnection, .RSocketErrorException, io.rsocket.exceptions.ConnectionErrorException, io.rsocket.frame.ErrorFrameCodec, .FrameHeaderCodec, io.rsocket.internal.UnboundedProcessor, java.net.SocketAddress, java.util.concurrent.atomic.AtomicIntegerFieldUpdater, .AtomicReferenceFieldUpdater, org.reactivestreams.Subscription, org.slf4j.Logger, .LoggerFactory, reactor.core.CoreSubscriber, .Disposable, .Scannable, reactor.core.publisher.Flux, .Mono, .Operators, .Sinks, reactor.util.annotation.Nullable

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Field Summary

Modifier and TypeField and Description
pack-priv static final AtomicReferenceFieldUpdater<ResumableDuplexConnection, DuplexConnection>
pack-priv volatile DuplexConnection
pack-priv ResumableDuplexConnection.FrameReceivingSubscriber
pack-priv int
pack-priv static final Logger
pack-priv final Sinks.Many<Integer>
pack-priv final Sinks.Empty<Void>
pack-priv final Sinks.Empty<Void>
pack-priv CoreSubscriber<? super ByteBuf>
pack-priv final SocketAddress
pack-priv final ResumableFramesStore
pack-priv final UnboundedProcessor
pack-priv final String
pack-priv final String
pack-priv volatile int
pack-priv static final AtomicIntegerFieldUpdater<ResumableDuplexConnection>

Constructor Summary

AccessConstructor and Description
public
ResumableDuplexConnection(String side, ByteBuf session, DuplexConnection initialConnection, ResumableFramesStore resumableFramesStore)

Method Summary

Modifier and TypeMethod and Description
public ByteBufAllocator
alloc()

Implements io.rsocket.DuplexConnection.alloc.

Returns the assigned ByteBufAllocator.
public void
cancel()

Implements org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.
public boolean
connect(DuplexConnection nextConnection)

public void
public void
dispose()

Implements reactor.core.Disposable.dispose.

Cancel or dispose the underlying task or resource.
pack-priv void
dispose(DuplexConnection nextConnection, Throwable e)

pack-priv void
public boolean
isDisposed()

Overrides default reactor.core.Disposable.isDisposed.

Optionally return true when the resource or task is disposed.
pack-priv static boolean
pack-priv Flux<Integer>
onActiveConnectionClosed()

Publisher for a sequence of integers starting at 1, with each next number emitted when the currently active connection is closed and should be resumed.

public Mono<Void>
onClose()

Implements io.rsocket.Closeable.onClose.

Returns a Mono that terminates when the instance is terminated by any reason.
public Flux<ByteBuf>
receive()

Implements io.rsocket.DuplexConnection.receive.

Returns a stream of all Frames received on this connection.
public SocketAddress
remoteAddress()

Implements io.rsocket.DuplexConnection.remoteAddress.

Return the remote address that this connection is connected to.
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 void
sendErrorAndClose(RSocketErrorException
to encode in the error frame
rSocketErrorException
)

Implements io.rsocket.DuplexConnection.sendErrorAndClose.

Send an error frame and after it is successfully sent, close the connection.
public void
sendFrame(int
to which the given frame relates
streamId
,
ByteBuf
with the encoded content
frame
)

Implements io.rsocket.DuplexConnection.sendFrame.

Delivers the given frame to the underlying transport connection.
public void
subscribe(CoreSubscriber<? super ByteBuf>
the Subscriber interested into the published sequence
receiverSubscriber
)

Implements abstract reactor.core.publisher.Flux.subscribe.

Implements reactor.core.CorePublisher.subscribe.

An internal Publisher#subscribe(Subscriber) that will bypass Hooks#onLastOperator(Function) pointcut.
public String
toString()

Overrides reactor.core.publisher.Flux.toString.

Returns a string representation of the object.
Inherited from reactor.core.publisher.Flux:
allanyasblockFirstblockFirstblockLastblockLastbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferTimeoutbufferTimeoutbufferTimeoutbufferTimeoutbufferTimeoutbufferTimeoutbufferTimeoutbufferTimeoutbufferUntilbufferUntilbufferUntilChangedbufferUntilChangedbufferUntilChangedbufferWhenbufferWhenbufferWhilecachecachecachecachecachecachecancelOncastcheckpointcheckpointcheckpointcollectcollectcollectListcollectMapcollectMapcollectMapcollectMultimapcollectMultimapcollectMultimapcollectSortedListcollectSortedListcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestconcatconcatconcatconcatconcatDelayErrorconcatDelayErrorconcatDelayErrorconcatDelayErrorconcatMapconcatMapconcatMapDelayErrorconcatMapDelayErrorconcatMapDelayErrorconcatMapIterableconcatMapIterableconcatWithconcatWithValuescontextCapturecontextWritecontextWritecountcreatecreatedefaultIfEmptydeferdeferContextualdelayElementsdelayElementsdelaySequencedelaySequencedelaySubscriptiondelaySubscriptiondelaySubscriptiondelayUntildematerializedistinctdistinctdistinctdistinctdistinctUntilChangeddistinctUntilChangeddistinctUntilChangeddoAfterTerminatedoFinallydoFirstdoOnCanceldoOnCompletedoOnDiscarddoOnEachdoOnErrordoOnErrordoOnErrordoOnNextdoOnRequestdoOnSubscribedoOnTerminateelapsedelapsedelementAtelementAtemptyerrorerrorerrorexpandexpandexpandDeepexpandDeepfilterfilterWhenfilterWhenfirstfirstfirstWithSignalfirstWithSignalfirstWithValuefirstWithValueflatMapflatMapflatMapflatMapflatMapDelayErrorflatMapIterableflatMapIterableflatMapSequentialflatMapSequentialflatMapSequentialflatMapSequentialDelayErrorfromfromArrayfromIterablefromStreamfromStreamgenerategenerategenerategetPrefetchgroupBygroupBygroupBygroupBygroupJoinhandlehasElementhasElementshideignoreElementsindexindexintervalintervalintervalintervaljoinjustjustlastlastlimitRatelimitRatelimitRequestloglogloglogloglogmapmapNotNullmaterializemergemergemergemergemergemergemergeComparingmergeComparingmergeComparingmergeComparingDelayErrormergeComparingWithmergeDelayErrormergeOrderedmergeOrderedmergeOrderedmergeOrderedWithmergePrioritymergePrioritymergePrioritymergePriorityDelayErrormergeSequentialmergeSequentialmergeSequentialmergeSequentialmergeSequentialmergeSequentialmergeSequentialDelayErrormergeSequentialDelayErrormergeSequentialDelayErrormergeWithmetricsnamenevernextofTypeonAssemblyonAssemblyonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureDroponBackpressureDroponBackpressureErroronBackpressureLatestonErrorCompleteonErrorCompleteonErrorCompleteonErrorContinueonErrorContinueonErrorContinueonErrorMaponErrorMaponErrorMaponErrorResumeonErrorResumeonErrorResumeonErrorReturnonErrorReturnonErrorReturnonErrorStoponTerminateDetachorparallelparallelparallelpublishpublishpublishpublishpublishNextpublishOnpublishOnpublishOnpushpushrangereducereducereduceWithrepeatrepeatrepeatrepeatrepeatWhenreplayreplayreplayreplayreplayreplayretryretryretryWhensamplesamplesampleFirstsampleFirstsampleTimeoutsampleTimeoutscanscanscanWithshareshareNextsinglesinglesingleOrEmptyskipskipskipskipLastskipUntilskipUntilOtherskipWhilesortsortstartWithstartWithstartWithsubscribesubscribesubscribesubscribesubscribesubscribesubscribesubscribeOnsubscribeOnsubscribeWithswitchIfEmptyswitchMapswitchMapswitchOnFirstswitchOnFirstswitchOnNextswitchOnNexttagtaketaketaketaketakeLasttakeUntiltakeUntilOthertakeWhiletaptaptapthenthenthenEmptythenManytimedtimedtimeouttimeouttimeouttimeouttimeouttimeouttimeouttimestamptimestamptoIterabletoIterabletoIterabletoStreamtoStreamtransformtransformDeferredtransformDeferredContextualusingusingusingWhenusingWhenwindowwindowwindowwindowwindowwindowwindowwindowTimeoutwindowTimeoutwindowTimeoutwindowTimeoutwindowUntilwindowUntilwindowUntilwindowUntilChangedwindowUntilChangedwindowUntilChangedwindowWhenwindowWhilewindowWhilewithLatestFromzipzipzipzipzipzipzipzipzipzipzipzipzipzipWithzipWithzipWithzipWithzipWithIterablezipWithIterable