public class KeepAliveConnection extends DuplexConnectionProxy implements ResumePositionsConnection
Disposable.Composite, Disposable.Swap| Modifier and Type | Method and Description |
|---|---|
void |
acceptResumeState(ResumeStateHolder resumeStateHolder) |
static KeepAliveConnection |
ofClient(ByteBufAllocator allocator,
DuplexConnection duplexConnection,
Function<ByteBuf,KeepAliveData> keepAliveData,
Consumer<Throwable> errorConsumer) |
static KeepAliveConnection |
ofServer(ByteBufAllocator allocator,
DuplexConnection duplexConnection,
Function<ByteBuf,KeepAliveData> keepAliveData,
Consumer<Throwable> errorConsumer) |
Mono<Void> |
onClose()
Returns a
Publisher that completes when this RSocket is closed. |
Flux<ByteBuf> |
receive()
Returns a stream of all
Frames received on this connection. |
Mono<Void> |
send(org.reactivestreams.Publisher<ByteBuf> frames)
Sends the source of Frames on this connection and returns the
Publisher representing
the result of this send. |
availability, delegate, dispose, isDisposedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitavailability, sendOnedispose, isDisposedpublic static KeepAliveConnection ofClient(ByteBufAllocator allocator, DuplexConnection duplexConnection, Function<ByteBuf,KeepAliveData> keepAliveData, Consumer<Throwable> errorConsumer)
public static KeepAliveConnection ofServer(ByteBufAllocator allocator, DuplexConnection duplexConnection, Function<ByteBuf,KeepAliveData> keepAliveData, Consumer<Throwable> errorConsumer)
public Mono<Void> send(org.reactivestreams.Publisher<ByteBuf> frames)
DuplexConnectionPublisher representing
the result of this send.
Publisher mustsend in interface DuplexConnectionsend in class DuplexConnectionProxyframes - Stream of Frames to send on the connection.Publisher that completes when all the frames are written on the connection
successfully and errors when it fails.public Flux<ByteBuf> receive()
DuplexConnectionFrames received on this connection.
Publisher MUST never emit a completion event (Subscriber.onComplete().
Publisher can error with various transport errors. If the underlying physical
connection is closed by the peer, then the returned stream from here MUST emit an
ClosedChannelException.
Publisher is not required to support multiple concurrent subscriptions.
RSocket will never have multiple subscriptions to this source. Implementations MUST
emit an IllegalStateException for subsequent concurrent subscriptions, if they do not
support multiple concurrent subscriptions.receive in interface DuplexConnectionreceive in class DuplexConnectionProxyFrames received.public Mono<Void> onClose()
CloseablePublisher that completes when this RSocket is closed. A RSocket can be closed by explicitly calling Disposable.dispose() or when the underlying
transport connection is closed.onClose in interface CloseableonClose in class DuplexConnectionProxyPublisher that completes when this RSocket close is complete.public void acceptResumeState(ResumeStateHolder resumeStateHolder)
acceptResumeState in interface ResumePositionsConnection