SocketChannelConfig implementation.
| Modifier and Type | Field and Description |
|---|---|
| private volatile boolean | |
| protected final Socket |
| Access | Constructor and Description |
|---|---|
| public |
| allowHalfClosure | back to summary |
|---|---|
| private volatile boolean allowHalfClosure | |
| javaSocket | back to summary |
|---|---|
| protected final Socket javaSocket | |
| DefaultSocketChannelConfig | back to summary |
|---|---|
| public DefaultSocketChannelConfig(SocketChannel channel, Socket javaSocket) Creates a new instance. | |
| getOption | back to summary |
|---|---|
| public <T> T getOption(ChannelOption<T> option) Overrides io. Implements io. Doc from io. Return the value of the given
| |
| getOptions | back to summary |
|---|---|
| public Map Overrides io. Implements io. Doc from io. Return all set
| |
| getReceiveBufferSize | back to summary |
|---|---|
| public int getReceiveBufferSize() Implements io. Doc from io. Gets the
| |
| getSendBufferSize | back to summary |
|---|---|
| public int getSendBufferSize() Implements io. Doc from io. Gets the
| |
| getSoLinger | back to summary |
|---|---|
| public int getSoLinger() Implements io. Doc from io. Gets the
| |
| getTrafficClass | back to summary |
|---|---|
| public int getTrafficClass() Implements io. Doc from io. Gets the
| |
| isAllowHalfClosure | back to summary |
|---|---|
| public boolean isAllowHalfClosure() Implements io. Doc from io. Returns
| |
| isKeepAlive | back to summary |
|---|---|
| public boolean isKeepAlive() Implements io. Doc from io. Gets the
| |
| isReuseAddress | back to summary |
|---|---|
| public boolean isReuseAddress() Implements io. Doc from io. Gets the
| |
| isTcpNoDelay | back to summary |
|---|---|
| public boolean isTcpNoDelay() Implements io. Doc from io. Gets the
| |
| setAllocator | back to summary |
|---|---|
| public SocketChannelConfig setAllocator(ByteBufAllocator allocator) Overrides io. Implements io. Doc from io. Set the
| |
| setAllowHalfClosure | back to summary |
|---|---|
| public SocketChannelConfig setAllowHalfClosure(boolean allowHalfClosure) Implements 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) Overrides io. Implements io. Doc from io. Sets whether the
| |
| setAutoRead | back to summary |
|---|---|
| public SocketChannelConfig setAutoRead(boolean autoRead) Overrides io. Implements io. Doc from io. Sets if
| |
| setConnectTimeoutMillis | back to summary |
|---|---|
| public SocketChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis) Overrides io. Implements io. Doc from io. Sets the connect timeout of the channel in milliseconds. If the
| |
| setKeepAlive | back to summary |
|---|---|
| public SocketChannelConfig setKeepAlive(boolean keepAlive) Implements io. Doc from io. Sets the
| |
| setMaxMessagesPerRead | back to summary |
|---|---|
| public SocketChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead) Overrides io. Implements io. Doc from io. Deprecated
| |
| setMessageSizeEstimator | back to summary |
|---|---|
| public SocketChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator) Overrides io. Implements io. Doc from io. Set the
| |
| setOption | back to summary |
|---|---|
| public <T> boolean setOption(ChannelOption<T> option, T value) Overrides io. Implements io. Doc from io. Sets a configuration property with the specified name and value. To override this method properly, you must call the super class:
public boolean setOption(ChannelOption<T> option, T value) {
if (super.setOption(option, value)) {
return true;
}
if (option.equals(additionalOption)) {
....
return true;
}
return false;
}
| |
| setPerformancePreferences | back to summary |
|---|---|
| public SocketChannelConfig setPerformancePreferences(int connectionTime, int latency, int bandwidth) Implements io. Doc from io. Sets the performance preferences as specified in
| |
| setReceiveBufferSize | back to summary |
|---|---|
| public SocketChannelConfig setReceiveBufferSize(int receiveBufferSize) Implements io. Doc from io. Sets the
| |
| setRecvByteBufAllocator | back to summary |
|---|---|
| public SocketChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator) Overrides io. Implements io. Doc from io. Set the
| |
| setReuseAddress | back to summary |
|---|---|
| public SocketChannelConfig setReuseAddress(boolean reuseAddress) Implements io. Doc from io. Sets the
| |
| setSendBufferSize | back to summary |
|---|---|
| public SocketChannelConfig setSendBufferSize(int sendBufferSize) Implements io. Doc from io. Sets the
| |
| setSoLinger | back to summary |
|---|---|
| public SocketChannelConfig setSoLinger(int soLinger) Implements io. Doc from io. Sets the
| |
| setTcpNoDelay | back to summary |
|---|---|
| public SocketChannelConfig setTcpNoDelay(boolean tcpNoDelay) Implements io. Doc from io. Sets the
| |
| setTrafficClass | back to summary |
|---|---|
| public SocketChannelConfig setTrafficClass(int trafficClass) Implements io. Doc from io. Sets the
| |
| setWriteBufferHighWaterMark | back to summary |
|---|---|
| public SocketChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark) Overrides io. Implements io. Doc from io.
Sets the high water mark of the write buffer. If the number of bytes
queued in the write buffer exceeds this value,
| |
| setWriteBufferLowWaterMark | back to summary |
|---|---|
| public SocketChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark) Overrides io. Implements io. Doc from io.
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,
| |
| setWriteBufferWaterMark | back to summary |
|---|---|
| public SocketChannelConfig setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark) Overrides io. Implements io. Doc from io. Set the
| |
| setWriteSpinCount | back to summary |
|---|---|
| public SocketChannelConfig setWriteSpinCount(int writeSpinCount) Overrides io. Implements io. Doc from io. Sets the maximum loop count for a write operation until
| |