public abstract class BaseDuplexConnection extends Object implements DuplexConnection
Disposable.Composite, Disposable.Swap
Modifier and Type | Field and Description |
---|---|
protected Sinks.Empty<Void> |
onClose |
protected UnboundedProcessor |
sender |
Constructor and Description |
---|
BaseDuplexConnection() |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
protected abstract void |
doOnClose() |
boolean |
isDisposed() |
Mono<Void> |
onClose()
Returns a
Mono that terminates when the instance is terminated by any reason. |
void |
sendFrame(int streamId,
ByteBuf frame)
Delivers the given frame to the underlying transport connection.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
alloc, availability, receive, remoteAddress, sendErrorAndClose
protected Sinks.Empty<Void> onClose
protected UnboundedProcessor sender
public void sendFrame(int streamId, ByteBuf frame)
DuplexConnection
sendFrame
in interface DuplexConnection
streamId
- to which the given frame relatesframe
- with the encoded contentprotected abstract void doOnClose()
public final Mono<Void> onClose()
Closeable
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
Subscriber.onError(Throwable)
. Otherwise, Subscriber.onComplete()
will be called.public final void dispose()
dispose
in interface Disposable
public final boolean isDisposed()
isDisposed
in interface Disposable