public class DefaultSocketSessionConfig extends AbstractSocketSessionConfig
SocketSessionConfig
.构造器和说明 |
---|
DefaultSocketSessionConfig()
Creates a new instance.
|
限定符和类型 | 方法和说明 |
---|---|
int |
getReceiveBufferSize() |
int |
getSendBufferSize() |
int |
getSoLinger()
Please note that enabling SO_LINGER in Java NIO can result
in platform-dependent behavior and unexpected blocking of I/O thread.
|
int |
getTrafficClass() |
void |
init(IoService parent) |
boolean |
isKeepAlive() |
protected boolean |
isKeepAliveChanged() |
boolean |
isOobInline() |
protected boolean |
isOobInlineChanged() |
protected boolean |
isReceiveBufferSizeChanged() |
boolean |
isReuseAddress() |
protected boolean |
isReuseAddressChanged() |
protected boolean |
isSendBufferSizeChanged() |
protected boolean |
isSoLingerChanged() |
boolean |
isTcpNoDelay() |
protected boolean |
isTcpNoDelayChanged() |
protected boolean |
isTrafficClassChanged() |
void |
setKeepAlive(boolean keepAlive) |
void |
setOobInline(boolean oobInline) |
void |
setReceiveBufferSize(int receiveBufferSize) |
void |
setReuseAddress(boolean reuseAddress) |
void |
setSendBufferSize(int sendBufferSize) |
void |
setSoLinger(int soLinger)
Please note that enabling SO_LINGER in Java NIO can result
in platform-dependent behavior and unexpected blocking of I/O thread.
|
void |
setTcpNoDelay(boolean tcpNoDelay) |
void |
setTrafficClass(int trafficClass) |
doSetAll
getBothIdleTime, getBothIdleTimeInMillis, getIdleTime, getIdleTimeInMillis, getMaxReadBufferSize, getMinReadBufferSize, getReadBufferSize, getReaderIdleTime, getReaderIdleTimeInMillis, getThroughputCalculationInterval, getThroughputCalculationIntervalInMillis, getWriterIdleTime, getWriterIdleTimeInMillis, getWriteTimeout, getWriteTimeoutInMillis, isUseReadOperation, setAll, setBothIdleTime, setIdleTime, setMaxReadBufferSize, setMinReadBufferSize, setReadBufferSize, setReaderIdleTime, setThroughputCalculationInterval, setUseReadOperation, setWriterIdleTime, setWriteTimeout
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBothIdleTime, getBothIdleTimeInMillis, getIdleTime, getIdleTimeInMillis, getMaxReadBufferSize, getMinReadBufferSize, getReadBufferSize, getReaderIdleTime, getReaderIdleTimeInMillis, getThroughputCalculationInterval, getThroughputCalculationIntervalInMillis, getWriterIdleTime, getWriterIdleTimeInMillis, getWriteTimeout, getWriteTimeoutInMillis, isUseReadOperation, setAll, setBothIdleTime, setIdleTime, setMaxReadBufferSize, setMinReadBufferSize, setReadBufferSize, setReaderIdleTime, setThroughputCalculationInterval, setUseReadOperation, setWriterIdleTime, setWriteTimeout
protected IoService parent
public void init(IoService parent)
public boolean isReuseAddress()
Socket.getReuseAddress()
public void setReuseAddress(boolean reuseAddress)
reuseAddress
- Tells if SO_REUSEADDR is enabled or disabledSocket.setReuseAddress(boolean)
public int getReceiveBufferSize()
Socket.getReceiveBufferSize()
public void setReceiveBufferSize(int receiveBufferSize)
receiveBufferSize
- The size of the receive bufferSocket.setReceiveBufferSize(int)
public int getSendBufferSize()
Socket.getSendBufferSize()
public void setSendBufferSize(int sendBufferSize)
sendBufferSize
- The size of the send bufferSocket.setSendBufferSize(int)
public int getTrafficClass()
Socket.getTrafficClass()
public void setTrafficClass(int trafficClass)
trafficClass
- The traffic class to set, one of IPTOS_LOWCOST (0x02)
IPTOS_RELIABILITY (0x04), IPTOS_THROUGHPUT (0x08) or IPTOS_LOWDELAY (0x10)Socket.setTrafficClass(int)
public boolean isKeepAlive()
Socket.getKeepAlive()
public void setKeepAlive(boolean keepAlive)
keepAlive
- if SO_KEEPALIVE is to be enabledSocket.setKeepAlive(boolean)
public boolean isOobInline()
Socket.getOOBInline()
public void setOobInline(boolean oobInline)
oobInline
- if SO_OOBINLINE is to be enabledSocket.setOOBInline(boolean)
public int getSoLinger()
SocketSessionConfig
Socket.getSoLinger()
,
Sun Bug Databasepublic void setSoLinger(int soLinger)
SocketSessionConfig
soLinger
- Please specify a negative value to disable SO_LINGER.Socket.setSoLinger(boolean, int)
,
Sun Bug Databasepublic boolean isTcpNoDelay()
Socket.getTcpNoDelay()
public void setTcpNoDelay(boolean tcpNoDelay)
tcpNoDelay
- true if TCP_NODELAY is to be enabledSocket.setTcpNoDelay(boolean)
protected boolean isKeepAliveChanged()
isKeepAliveChanged
在类中 AbstractSocketSessionConfig
protected boolean isOobInlineChanged()
isOobInlineChanged
在类中 AbstractSocketSessionConfig
protected boolean isReceiveBufferSizeChanged()
isReceiveBufferSizeChanged
在类中 AbstractSocketSessionConfig
protected boolean isReuseAddressChanged()
isReuseAddressChanged
在类中 AbstractSocketSessionConfig
protected boolean isSendBufferSizeChanged()
isSendBufferSizeChanged
在类中 AbstractSocketSessionConfig
protected boolean isSoLingerChanged()
isSoLingerChanged
在类中 AbstractSocketSessionConfig
protected boolean isTcpNoDelayChanged()
isTcpNoDelayChanged
在类中 AbstractSocketSessionConfig
protected boolean isTrafficClassChanged()
isTrafficClassChanged
在类中 AbstractSocketSessionConfig