Interface NettyConnection<Read,Write>
- Type Parameters:
Read
- Type of objects read from this connection.Write
- Type of objects written to this connection.
- All Superinterfaces:
AsyncCloseable
,ConnectionContext
,ConnectionInfo
,ListenableAsyncCloseable
,NettyConnectionContext
- All Known Implementing Classes:
DefaultNettyConnection
A wrapper over a physical connection providing a way to read/write as a
Publisher
.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.servicetalk.transport.api.ConnectionInfo
ConnectionInfo.Protocol
Nested classes/interfaces inherited from interface io.servicetalk.transport.netty.internal.NettyConnectionContext
NettyConnectionContext.FlushStrategyProvider
-
Method Summary
Modifier and TypeMethodDescriptionread()
ReturnsPublisher
that emits all items as read from this connection.Writes all elements emitted by the passedPublisher
on this connection.write
(Publisher<Write> write, Supplier<FlushStrategy> flushStrategySupplier, Supplier<WriteDemandEstimator> demandEstimatorSupplier) Writes all elements emitted by the passedPublisher
on this connection.Methods inherited from interface io.servicetalk.concurrent.api.AsyncCloseable
closeAsync, closeAsyncGracefully
Methods inherited from interface io.servicetalk.transport.api.ConnectionContext
parent
Methods inherited from interface io.servicetalk.transport.api.ConnectionInfo
executionContext, localAddress, protocol, remoteAddress, socketOption, sslConfig, sslSession
Methods inherited from interface io.servicetalk.concurrent.api.ListenableAsyncCloseable
onClose
Methods inherited from interface io.servicetalk.transport.netty.internal.NettyConnectionContext
defaultFlushStrategy, nettyChannel, onClosing, transportError, updateFlushStrategy
-
Method Details
-
read
ReturnsPublisher
that emits all items as read from this connection.- Returns:
Publisher
that emits all items as read from this connection. Concurrent subscribes when aPublisherSource.Subscriber
is already active) are disallowed but sequential subscribes when a previousPublisherSource.Subscriber
has terminated) are allowed.
-
write
Writes all elements emitted by the passedPublisher
on this connection.- Parameters:
write
-Publisher
, all objects emitted from which are written on this connection.- Returns:
Completable
that terminates as follows:
-
write
Completable write(Publisher<Write> write, Supplier<FlushStrategy> flushStrategySupplier, Supplier<WriteDemandEstimator> demandEstimatorSupplier) Writes all elements emitted by the passedPublisher
on this connection.- Parameters:
write
-Publisher
, all objects emitted from which are written on this connection.flushStrategySupplier
-Supplier
ofFlushStrategy
which controls the flush operations for this write.demandEstimatorSupplier
- ASupplier
ofWriteDemandEstimator
for this write.- Returns:
Completable
that terminates as follows:
-