Package org.apache.mina.transport.socket
Interface SocketSessionConfig
-
- All Superinterfaces:
IoSessionConfig
- All Known Implementing Classes:
AbstractSocketSessionConfig,DefaultSocketSessionConfig
public interface SocketSessionConfig extends IoSessionConfig
AnIoSessionConfigfor socket transport type.- Author:
- Apache MINA Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetReceiveBufferSize()intgetSendBufferSize()intgetSoLinger()Please note that enablingSO_LINGERin Java NIO can result in platform-dependent behavior and unexpected blocking of I/O thread.intgetTrafficClass()booleanisKeepAlive()booleanisOobInline()booleanisReuseAddress()booleanisTcpNoDelay()voidsetKeepAlive(boolean keepAlive)voidsetOobInline(boolean oobInline)voidsetReceiveBufferSize(int receiveBufferSize)voidsetReuseAddress(boolean reuseAddress)voidsetSendBufferSize(int sendBufferSize)voidsetSoLinger(int soLinger)Please note that enablingSO_LINGERin Java NIO can result in platform-dependent behaviour and unexpected blocking of I/O thread.voidsetTcpNoDelay(boolean tcpNoDelay)voidsetTrafficClass(int trafficClass)-
Methods inherited from interface org.apache.mina.core.session.IoSessionConfig
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
-
-
-
-
Method Detail
-
isReuseAddress
boolean isReuseAddress()
- Returns:
trueif SO_REUSEADDR is enabled.- See Also:
Socket.getReuseAddress()
-
setReuseAddress
void setReuseAddress(boolean reuseAddress)
- Parameters:
reuseAddress- Tells if SO_REUSEADDR is enabled or disabled- See Also:
Socket.setReuseAddress(boolean)
-
getReceiveBufferSize
int getReceiveBufferSize()
- Returns:
- the size of the receive buffer
- See Also:
Socket.getReceiveBufferSize()
-
setReceiveBufferSize
void setReceiveBufferSize(int receiveBufferSize)
- Parameters:
receiveBufferSize- The size of the receive buffer- See Also:
Socket.setReceiveBufferSize(int)
-
getSendBufferSize
int getSendBufferSize()
- Returns:
- the size of the send buffer
- See Also:
Socket.getSendBufferSize()
-
setSendBufferSize
void setSendBufferSize(int sendBufferSize)
- Parameters:
sendBufferSize- The size of the send buffer- See Also:
Socket.setSendBufferSize(int)
-
getTrafficClass
int getTrafficClass()
- Returns:
- the traffic class
- See Also:
Socket.getTrafficClass()
-
setTrafficClass
void setTrafficClass(int trafficClass)
- Parameters:
trafficClass- The traffic class to set, one ofIPTOS_LOWCOST(0x02)IPTOS_RELIABILITY(0x04),IPTOS_THROUGHPUT(0x08) orIPTOS_LOWDELAY(0x10)- See Also:
Socket.setTrafficClass(int)
-
isKeepAlive
boolean isKeepAlive()
- Returns:
trueifSO_KEEPALIVEis enabled.- See Also:
Socket.getKeepAlive()
-
setKeepAlive
void setKeepAlive(boolean keepAlive)
- Parameters:
keepAlive- ifSO_KEEPALIVEis to be enabled- See Also:
Socket.setKeepAlive(boolean)
-
isOobInline
boolean isOobInline()
- Returns:
trueifSO_OOBINLINEis enabled.- See Also:
Socket.getOOBInline()
-
setOobInline
void setOobInline(boolean oobInline)
- Parameters:
oobInline- ifSO_OOBINLINEis to be enabled- See Also:
Socket.setOOBInline(boolean)
-
getSoLinger
int getSoLinger()
Please note that enablingSO_LINGERin Java NIO can result in platform-dependent behavior and unexpected blocking of I/O thread.- Returns:
- The value for
SO_LINGER - See Also:
Socket.getSoLinger(), Sun Bug Database
-
setSoLinger
void setSoLinger(int soLinger)
Please note that enablingSO_LINGERin Java NIO can result in platform-dependent behaviour and unexpected blocking of I/O thread.- Parameters:
soLinger- Please specify a negative value to disableSO_LINGER.- See Also:
Socket.setSoLinger(boolean, int), Sun Bug Database
-
isTcpNoDelay
boolean isTcpNoDelay()
- Returns:
trueifTCP_NODELAYis enabled.- See Also:
Socket.getTcpNoDelay()
-
setTcpNoDelay
void setTcpNoDelay(boolean tcpNoDelay)
- Parameters:
tcpNoDelay-trueifTCP_NODELAYis to be enabled- See Also:
Socket.setTcpNoDelay(boolean)
-
-