ChannelConfig for a SocketChannel.
DuplexChannelConfig,
SocketChannelConfig allows the following options in the option map:
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public int | |
| public int | |
| public int | |
| public boolean | |
| public boolean | |
| public boolean | |
| public SocketChannelConfig | setAllocator(ByteBufAllocator allocator)
Redeclares io. ByteBufAllocator which is used for the channel
to allocate buffers.
|
| public SocketChannelConfig | setAllowHalfClosure(boolean allowHalfClosure)
Redeclares io. |
| public SocketChannelConfig | setAutoClose(boolean autoClose)
Redeclares io. Channel should be closed automatically and immediately on write failure.
|
| public SocketChannelConfig | setAutoRead(boolean autoRead)
Redeclares io. ChannelHandlerContext#read() will be invoked automatically so that a user application doesn't
need to call it at all.
|
| public SocketChannelConfig | setConnectTimeoutMillis(int
the connect timeout in milliseconds.
connectTimeoutMillis)0 to disable.Redeclares io. |
| public SocketChannelConfig | |
| public SocketChannelConfig | setMaxMessagesPerRead(int maxMessagesPerRead)
Redeclares io.
Deprecated
|
| public SocketChannelConfig | setMessageSizeEstimator(MessageSizeEstimator estimator)
Redeclares io. MessageSizeEstimator which is used for the channel
to detect the size of a message.
|
| public SocketChannelConfig | setPerformancePreferences(int connectionTime, int latency, int bandwidth)
Sets the performance preferences as specified in
|
| public SocketChannelConfig | |
| public SocketChannelConfig | setRecvByteBufAllocator(RecvByteBufAllocator allocator)
Redeclares io. RecvByteBufAllocator which is used for the channel to allocate receive buffers.
|
| public SocketChannelConfig | |
| public SocketChannelConfig | |
| public SocketChannelConfig | |
| public SocketChannelConfig | |
| public SocketChannelConfig | |
| public SocketChannelConfig | setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark)
Redeclares io. WriteBufferWaterMark which is used for setting the high and low
water mark of the write buffer.
|
| public SocketChannelConfig | setWriteSpinCount(int writeSpinCount)
Redeclares io. WritableByteChannel#write(ByteBuffer) returns a non-zero value.
|
| getReceiveBufferSize | back to summary |
|---|---|
| public int getReceiveBufferSize() Gets the | |
| getSendBufferSize | back to summary |
|---|---|
| public int getSendBufferSize() Gets the | |
| getSoLinger | back to summary |
|---|---|
| public int getSoLinger() Gets the | |
| getTrafficClass | back to summary |
|---|---|
| public int getTrafficClass() Gets the | |
| isKeepAlive | back to summary |
|---|---|
| public boolean isKeepAlive() Gets the | |
| isReuseAddress | back to summary |
|---|---|
| public boolean isReuseAddress() Gets the | |
| isTcpNoDelay | back to summary |
|---|---|
| public boolean isTcpNoDelay() Gets the | |
| setAllocator | back to summary |
|---|---|
| public SocketChannelConfig setAllocator(ByteBufAllocator allocator) Redeclares io. Doc from io. Set the
| |
| setAllowHalfClosure | back to summary |
|---|---|
| public SocketChannelConfig setAllowHalfClosure(boolean allowHalfClosure) Redeclares io. Doc from io. Sets whether the channel should not close itself when its remote peer shuts down output to
make the connection half-closed. If
| |
| setAutoClose | back to summary |
|---|---|
| public SocketChannelConfig setAutoClose(boolean autoClose) Redeclares io. Doc from io. Sets whether the
| |
| setAutoRead | back to summary |
|---|---|
| public SocketChannelConfig setAutoRead(boolean autoRead) Redeclares io. Doc from io. Sets if
| |
| setConnectTimeoutMillis | back to summary |
|---|---|
| public SocketChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis) Redeclares io. Doc from io. Sets the connect timeout of the channel in milliseconds. If the
| |
| setKeepAlive | back to summary |
|---|---|
| public SocketChannelConfig setKeepAlive(boolean keepAlive) Sets the | |
| setMaxMessagesPerRead | back to summary |
|---|---|
| public SocketChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead) Redeclares io. Deprecated
| |
| setMessageSizeEstimator | back to summary |
|---|---|
| public SocketChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator) Redeclares io. Doc from io. Set the
| |
| setPerformancePreferences | back to summary |
|---|---|
| public SocketChannelConfig setPerformancePreferences(int connectionTime, int latency, int bandwidth) Sets the performance preferences as specified in
| |
| setReceiveBufferSize | back to summary |
|---|---|
| public SocketChannelConfig setReceiveBufferSize(int receiveBufferSize) Sets the | |
| setRecvByteBufAllocator | back to summary |
|---|---|
| public SocketChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator) Redeclares io. Doc from io. Set the
| |
| setReuseAddress | back to summary |
|---|---|
| public SocketChannelConfig setReuseAddress(boolean reuseAddress) Sets the | |
| setSendBufferSize | back to summary |
|---|---|
| public SocketChannelConfig setSendBufferSize(int sendBufferSize) Sets the | |
| setSoLinger | back to summary |
|---|---|
| public SocketChannelConfig setSoLinger(int soLinger) Sets the | |
| setTcpNoDelay | back to summary |
|---|---|
| public SocketChannelConfig setTcpNoDelay(boolean tcpNoDelay) Sets the | |
| setTrafficClass | back to summary |
|---|---|
| public SocketChannelConfig setTrafficClass(int trafficClass) Sets the | |
| setWriteBufferWaterMark | back to summary |
|---|---|
| public SocketChannelConfig setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark) Redeclares io. Doc from io. Set the
| |
| setWriteSpinCount | back to summary |
|---|---|
| public SocketChannelConfig setWriteSpinCount(int writeSpinCount) Redeclares io. Doc from io. Sets the maximum loop count for a write operation until
| |