Package io.netty.handler.codec.quic
Interface QuicStreamChannelConfig
-
- All Superinterfaces:
ChannelConfig
,DuplexChannelConfig
public interface QuicStreamChannelConfig extends DuplexChannelConfig
DuplexChannelConfig
for QUIC streams.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isReadFrames()
Returnstrue
if theQuicStreamChannel
will readQuicStreamFrame
s and fire these through theChannelPipeline
,false
if it usesByteBuf
.QuicStreamChannelConfig
setAllocator(ByteBufAllocator allocator)
Set theByteBufAllocator
which is used for the channel to allocate buffers.QuicStreamChannelConfig
setAllowHalfClosure(boolean allowHalfClosure)
Sets whether the channel should not close itself when its remote peer shuts down output to make the connection half-closed.QuicStreamChannelConfig
setAutoClose(boolean autoClose)
Sets whether theChannel
should be closed automatically and immediately on write failure.QuicStreamChannelConfig
setAutoRead(boolean autoRead)
Sets ifChannelHandlerContext.read()
will be invoked automatically so that a user application doesn't need to call it at all.QuicStreamChannelConfig
setConnectTimeoutMillis(int connectTimeoutMillis)
Sets the connect timeout of the channel in milliseconds.QuicStreamChannelConfig
setMaxMessagesPerRead(int maxMessagesPerRead)
QuicStreamChannelConfig
setMessageSizeEstimator(MessageSizeEstimator estimator)
Set theMessageSizeEstimator
which is used for the channel to detect the size of a message.QuicStreamChannelConfig
setReadFrames(boolean readFrames)
Set this totrue
if theQuicStreamChannel
should readQuicStreamFrame
s and fire these through theChannelPipeline
,false
if it usesByteBuf
.QuicStreamChannelConfig
setRecvByteBufAllocator(RecvByteBufAllocator allocator)
Set theRecvByteBufAllocator
which is used for the channel to allocate receive buffers.QuicStreamChannelConfig
setWriteBufferHighWaterMark(int writeBufferHighWaterMark)
Sets the high water mark of the write buffer.QuicStreamChannelConfig
setWriteBufferLowWaterMark(int writeBufferLowWaterMark)
Sets the low water mark of the write buffer.QuicStreamChannelConfig
setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark)
Set theWriteBufferWaterMark
which is used for setting the high and low water mark of the write buffer.QuicStreamChannelConfig
setWriteSpinCount(int writeSpinCount)
Sets the maximum loop count for a write operation untilWritableByteChannel.write(ByteBuffer)
returns a non-zero value.-
Methods inherited from interface io.netty.channel.ChannelConfig
getAllocator, getConnectTimeoutMillis, getMaxMessagesPerRead, getMessageSizeEstimator, getOption, getOptions, getRecvByteBufAllocator, getWriteBufferHighWaterMark, getWriteBufferLowWaterMark, getWriteBufferWaterMark, getWriteSpinCount, isAutoClose, isAutoRead, setOption, setOptions
-
Methods inherited from interface io.netty.channel.socket.DuplexChannelConfig
isAllowHalfClosure
-
-
-
-
Method Detail
-
setReadFrames
QuicStreamChannelConfig setReadFrames(boolean readFrames)
Set this totrue
if theQuicStreamChannel
should readQuicStreamFrame
s and fire these through theChannelPipeline
,false
if it usesByteBuf
.- Parameters:
readFrames
-true
ifQuicStreamFrame
s should be used,false
ifByteBuf
should be used.- Returns:
- this instance itself.
-
isReadFrames
boolean isReadFrames()
Returnstrue
if theQuicStreamChannel
will readQuicStreamFrame
s and fire these through theChannelPipeline
,false
if it usesByteBuf
.- Returns:
true
ifQuicStreamFrame
s should be used,false
ifByteBuf
should be used.
-
setAllowHalfClosure
QuicStreamChannelConfig setAllowHalfClosure(boolean allowHalfClosure)
Description copied from interface:DuplexChannelConfig
Sets whether the channel should not close itself when its remote peer shuts down output to make the connection half-closed. Iftrue
the connection is not closed when the remote peer shuts down output. Instead,ChannelInboundHandler.userEventTriggered(ChannelHandlerContext, Object)
is invoked with aChannelInputShutdownEvent
object. Iffalse
, the connection is closed automatically.- Specified by:
setAllowHalfClosure
in interfaceDuplexChannelConfig
-
setMaxMessagesPerRead
QuicStreamChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead)
- Specified by:
setMaxMessagesPerRead
in interfaceChannelConfig
- Specified by:
setMaxMessagesPerRead
in interfaceDuplexChannelConfig
-
setWriteSpinCount
QuicStreamChannelConfig setWriteSpinCount(int writeSpinCount)
Description copied from interface:ChannelConfig
Sets the maximum loop count for a write operation untilWritableByteChannel.write(ByteBuffer)
returns a non-zero value. It is similar to what a spin lock is used for in concurrency programming. It improves memory utilization and write throughput depending on the platform that JVM runs on. The default value is16
.- Specified by:
setWriteSpinCount
in interfaceChannelConfig
- Specified by:
setWriteSpinCount
in interfaceDuplexChannelConfig
-
setAllocator
QuicStreamChannelConfig setAllocator(ByteBufAllocator allocator)
Description copied from interface:ChannelConfig
Set theByteBufAllocator
which is used for the channel to allocate buffers.- Specified by:
setAllocator
in interfaceChannelConfig
- Specified by:
setAllocator
in interfaceDuplexChannelConfig
-
setRecvByteBufAllocator
QuicStreamChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator)
Description copied from interface:ChannelConfig
Set theRecvByteBufAllocator
which is used for the channel to allocate receive buffers.- Specified by:
setRecvByteBufAllocator
in interfaceChannelConfig
- Specified by:
setRecvByteBufAllocator
in interfaceDuplexChannelConfig
-
setAutoRead
QuicStreamChannelConfig setAutoRead(boolean autoRead)
Description copied from interface:ChannelConfig
Sets ifChannelHandlerContext.read()
will be invoked automatically so that a user application doesn't need to call it at all. The default value istrue
.- Specified by:
setAutoRead
in interfaceChannelConfig
- Specified by:
setAutoRead
in interfaceDuplexChannelConfig
-
setAutoClose
QuicStreamChannelConfig setAutoClose(boolean autoClose)
Description copied from interface:ChannelConfig
Sets whether theChannel
should be closed automatically and immediately on write failure. The default istrue
.- Specified by:
setAutoClose
in interfaceChannelConfig
- Specified by:
setAutoClose
in interfaceDuplexChannelConfig
-
setMessageSizeEstimator
QuicStreamChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator)
Description copied from interface:ChannelConfig
Set theMessageSizeEstimator
which is used for the channel to detect the size of a message.- Specified by:
setMessageSizeEstimator
in interfaceChannelConfig
- Specified by:
setMessageSizeEstimator
in interfaceDuplexChannelConfig
-
setWriteBufferWaterMark
QuicStreamChannelConfig setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark)
Description copied from interface:ChannelConfig
Set theWriteBufferWaterMark
which is used for setting the high and low water mark of the write buffer.- Specified by:
setWriteBufferWaterMark
in interfaceChannelConfig
- Specified by:
setWriteBufferWaterMark
in interfaceDuplexChannelConfig
-
setConnectTimeoutMillis
QuicStreamChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis)
Description copied from interface:ChannelConfig
Sets the connect timeout of the channel in milliseconds. If theChannel
does not support connect operation, this property is not used at all, and therefore will be ignored.- Specified by:
setConnectTimeoutMillis
in interfaceChannelConfig
- Parameters:
connectTimeoutMillis
- the connect timeout in milliseconds.0
to disable.
-
setWriteBufferHighWaterMark
QuicStreamChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark)
Description copied from interface:ChannelConfig
Sets the high water mark of the write buffer. If the number of bytes queued in the write buffer exceeds this value,
Channel.isWritable()
will start to returnfalse
.- Specified by:
setWriteBufferHighWaterMark
in interfaceChannelConfig
-
setWriteBufferLowWaterMark
QuicStreamChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark)
Description copied from interface:ChannelConfig
Sets the low water mark of the write buffer. Once the number of bytes queued in the write buffer exceeded the high water mark and then dropped down below this value,
Channel.isWritable()
will start to returntrue
again.- Specified by:
setWriteBufferLowWaterMark
in interfaceChannelConfig
-
-