Read
- Type of objects read from this connection.Write
- Type of objects written to this connection.public interface NettyConnection<Read,Write> extends NettyConnectionContext
Publisher
.Modifier and Type | Interface and Description |
---|---|
static interface |
NettyConnection.RequestNSupplier
A supplier that provides a correct value of
n for calls to PublisherSource.Subscription.request(long) per
PublisherSource.Subscription . |
static class |
NettyConnection.TerminalPredicate<Read>
A dynamic
Predicate to detect terminal message in a stream as returned by read() . |
NettyConnectionContext.FlushStrategyProvider
Modifier and Type | Method and Description |
---|---|
Publisher<Read> |
read()
Returns
Publisher that emits all items as read from this connection. |
NettyConnection.TerminalPredicate<Read> |
terminalMsgPredicate()
Returns the
NettyConnection.TerminalPredicate associated with this NettyConnection to detect terminal messages
for the otherwise infinite Publisher returned by read() . |
Completable |
write(Publisher<Write> write)
Writes all elements emitted by the passed
Publisher on this connection. |
Completable |
write(Publisher<Write> write,
java.util.function.Supplier<NettyConnection.RequestNSupplier> requestNSupplierFactory)
Writes all elements emitted by the passed
Publisher on this connection. |
Completable |
writeAndFlush(Single<Write> write)
Write and flushes the object emitted by the passed
Single on this connection. |
Completable |
writeAndFlush(Write write)
Write and flushes the passed
Buffer on this connection. |
defaultFlushStrategy, nettyChannel, onClosing, transportError, updateFlushStrategy
executionContext, localAddress, remoteAddress, sslSession
onClose
closeAsync, closeAsyncGracefully
Publisher<Read> read()
Publisher
that emits all items as read from this connection.Publisher
that emits all items as read from this connection.
Concurrent subscribes when a PublisherSource.Subscriber
is already active) are disallowed but sequential subscribes when
a previous PublisherSource.Subscriber
has terminated) are allowed.NettyConnection.TerminalPredicate<Read> terminalMsgPredicate()
NettyConnection.TerminalPredicate
associated with this NettyConnection
to detect terminal messages
for the otherwise infinite Publisher
returned by read()
.NettyConnection.TerminalPredicate
for this connection.Completable write(Publisher<Write> write)
Publisher
on this connection.write
- Publisher
, all objects emitted from which are written on this connection.Completable
that terminates as follows:
Completable write(Publisher<Write> write, java.util.function.Supplier<NettyConnection.RequestNSupplier> requestNSupplierFactory)
Publisher
on this connection.write
- Publisher
, all objects emitted from which are written on this connection.requestNSupplierFactory
- A Supplier
of NettyConnection.RequestNSupplier
for this write.Completable
that terminates as follows:
Completable writeAndFlush(Single<Write> write)
Single
on this connection.write
- Single
, result of which is written on this connection.Completable
that terminates as follows:
Completable writeAndFlush(Write write)
Buffer
on this connection.write
- Buffer
to write on this connection.Completable
that terminates as follows: