public class DefaultSocketSessionConfig extends AbstractSocketSessionConfig
SocketSessionConfig
.Constructor and Description |
---|
DefaultSocketSessionConfig()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
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)
Initialize this configuration.
|
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) |
setAll
getBothIdleTime, getBothIdleTimeInMillis, getIdleTime, getIdleTimeInMillis, getMaxReadBufferSize, getMinReadBufferSize, getReadBufferSize, getReaderIdleTime, getReaderIdleTimeInMillis, getThroughputCalculationInterval, getThroughputCalculationIntervalInMillis, getWriterIdleTime, getWriterIdleTimeInMillis, getWriteTimeout, getWriteTimeoutInMillis, isUseReadOperation, 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, setBothIdleTime, setIdleTime, setMaxReadBufferSize, setMinReadBufferSize, setReadBufferSize, setReaderIdleTime, setThroughputCalculationInterval, setUseReadOperation, setWriterIdleTime, setWriteTimeout
protected IoService parent
public DefaultSocketSessionConfig()
public void init(IoService parent)
parent
- The parent IoService.public boolean isReuseAddress()
true
if SO_REUSEADDR is enabled.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()
true
if SO_KEEPALIVE
is enabled.Socket.getKeepAlive()
public void setKeepAlive(boolean keepAlive)
keepAlive
- if SO_KEEPALIVE
is to be enabledSocket.setKeepAlive(boolean)
public boolean isOobInline()
true
if SO_OOBINLINE
is enabled.Socket.getOOBInline()
public void setOobInline(boolean oobInline)
oobInline
- if SO_OOBINLINE
is to be enabledSocket.setOOBInline(boolean)
public int getSoLinger()
SO_LINGER
in Java NIO can result
in platform-dependent behavior and unexpected blocking of I/O thread.SO_LINGER
Socket.getSoLinger()
,
Sun Bug Databasepublic void setSoLinger(int soLinger)
SO_LINGER
in Java NIO can result
in platform-dependent behavior and unexpected blocking of I/O thread.soLinger
- Please specify a negative value to disable SO_LINGER
.Socket.setSoLinger(boolean, int)
,
Sun Bug Databasepublic boolean isTcpNoDelay()
true
if TCP_NODELAY
is enabled.Socket.getTcpNoDelay()
public void setTcpNoDelay(boolean tcpNoDelay)
tcpNoDelay
- true
if TCP_NODELAY
is to be enabledSocket.setTcpNoDelay(boolean)
protected boolean isKeepAliveChanged()
isKeepAliveChanged
in class AbstractSocketSessionConfig
true
if and only if the keepAlive
property
has been changed by its setter method. The system call related with
the property is made only when this method returns true
. By
default, this method always returns true
to simplify implementation
of subclasses, but overriding the default behavior is always encouraged.protected boolean isOobInlineChanged()
isOobInlineChanged
in class AbstractSocketSessionConfig
true
if and only if the oobInline
property
has been changed by its setter method. The system call related with
the property is made only when this method returns true
. By
default, this method always returns true
to simplify implementation
of subclasses, but overriding the default behavior is always encouraged.protected boolean isReceiveBufferSizeChanged()
isReceiveBufferSizeChanged
in class AbstractSocketSessionConfig
true
if and only if the receiveBufferSize
property
has been changed by its setter method. The system call related with
the property is made only when this method returns true
. By
default, this method always returns true
to simplify implementation
of subclasses, but overriding the default behavior is always encouraged.protected boolean isReuseAddressChanged()
isReuseAddressChanged
in class AbstractSocketSessionConfig
true
if and only if the reuseAddress
property
has been changed by its setter method. The system call related with
the property is made only when this method returns true
. By
default, this method always returns true
to simplify implementation
of subclasses, but overriding the default behavior is always encouraged.protected boolean isSendBufferSizeChanged()
isSendBufferSizeChanged
in class AbstractSocketSessionConfig
true
if and only if the sendBufferSize
property
has been changed by its setter method. The system call related with
the property is made only when this method returns true
. By
default, this method always returns true
to simplify implementation
of subclasses, but overriding the default behavior is always encouraged.protected boolean isSoLingerChanged()
isSoLingerChanged
in class AbstractSocketSessionConfig
true
if and only if the soLinger
property
has been changed by its setter method. The system call related with
the property is made only when this method returns true
. By
default, this method always returns true
to simplify implementation
of subclasses, but overriding the default behavior is always encouraged.protected boolean isTcpNoDelayChanged()
isTcpNoDelayChanged
in class AbstractSocketSessionConfig
true
if and only if the tcpNoDelay
property
has been changed by its setter method. The system call related with
the property is made only when this method returns true
. By
default, this method always returns true
to simplify implementation
of subclasses, but overriding the default behavior is always encouraged.protected boolean isTrafficClassChanged()
isTrafficClassChanged
in class AbstractSocketSessionConfig
true
if and only if the trafficClass
property
has been changed by its setter method. The system call related with
the property is made only when this method returns true
. By
default, this method always returns true
to simplify implementation
of subclasses, but overriding the default behavior is always encouraged.Copyright © 2004–2025 Apache MINA Project. All rights reserved.