Top Fields Constructors Methods
io.rsocket.internal

public abstract Class BaseDuplexConnection

extends Object
implements DuplexConnection
Class Inheritance
All Implemented Interfaces
io.rsocket.DuplexConnection, io.rsocket.Closeable, reactor.core.Disposable, io.rsocket.Availability
Imports
io.netty.buffer.ByteBuf, io.rsocket.DuplexConnection, reactor.core.Scannable, reactor.core.publisher.Mono, .Sinks

Field Summary

Modifier and TypeField and Description
protected final Sinks.Empty<Void>
protected final UnboundedProcessor

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final void
dispose()

Implements reactor.core.Disposable.dispose.

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

Overrides default reactor.core.Disposable.isDisposed.

Optionally return true when the resource or task is disposed.
public Mono<Void>
onClose()

Implements io.rsocket.Closeable.onClose.

Returns a Mono that terminates when the instance is terminated by any reason.
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.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

onCloseback to summary
protected final Sinks.Empty<Void> onClose
senderback to summary
protected final UnboundedProcessor sender

Constructor Detail

BaseDuplexConnectionback to summary
public BaseDuplexConnection()

Method Detail

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
doOnCloseback to summary
protected abstract void doOnClose()
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
@SuppressWarnings:ConstantConditions
onCloseback to summary
public Mono<Void> onClose()

Implements io.rsocket.Closeable.onClose.

Doc from io.rsocket.Closeable.onClose.

Returns a Mono that terminates when the instance is terminated by any reason. Note, in case of error termination, the cause of error will be propagated as an error signal through org.reactivestreams.Subscriber#onError(Throwable). Otherwise, Subscriber#onComplete() will be called.

Returns:Mono<Void>

a Mono to track completion with success or error of the underlying resource. When the underlying resource is an `RSocket`, the Mono exposes stream 0 (i.e. connection level) errors.

Annotations
@Override
sendFrameback to summary
public void sendFrame(int streamId, ByteBuf frame)

Implements io.rsocket.DuplexConnection.sendFrame.

Doc from io.rsocket.DuplexConnection.sendFrame.

Delivers the given frame to the underlying transport connection. This method is non-blocking and can be safely executed from multiple threads. This method does not provide any flow-control mechanism.

Parameters
streamId:int

to which the given frame relates

frame:ByteBuf

with the encoded content

Annotations
@Override