Class AprSocketSession.SessionConfigImpl
- java.lang.Object
-
- org.apache.mina.core.session.AbstractIoSessionConfig
-
- org.apache.mina.transport.socket.AbstractSocketSessionConfig
-
- org.apache.mina.transport.socket.apr.AprSocketSession.SessionConfigImpl
-
- All Implemented Interfaces:
IoSessionConfig,SocketSessionConfig
- Enclosing class:
- AprSocketSession
private class AprSocketSession.SessionConfigImpl extends AbstractSocketSessionConfig
The implementation for theIoSessionConfigrelated to APR TCP socket.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateSessionConfigImpl()
-
Method Summary
All Methods Instance Methods Concrete 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()not supported for the momentbooleanisReuseAddress()booleanisTcpNoDelay()voidsetKeepAlive(boolean on)voidsetOobInline(boolean on)not supported for the momentvoidsetReceiveBufferSize(int size)voidsetReuseAddress(boolean on)voidsetSendBufferSize(int size)voidsetSoLinger(int linger)Please note that enablingSO_LINGERin Java NIO can result in platform-dependent behavior and unexpected blocking of I/O thread.voidsetTcpNoDelay(boolean on)voidsetTrafficClass(int tc)-
Methods inherited from class org.apache.mina.transport.socket.AbstractSocketSessionConfig
isKeepAliveChanged, isOobInlineChanged, isReceiveBufferSizeChanged, isReuseAddressChanged, isSendBufferSizeChanged, isSoLingerChanged, isTcpNoDelayChanged, isTrafficClassChanged, setAll
-
Methods inherited from class org.apache.mina.core.session.AbstractIoSessionConfig
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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, setBothIdleTime, setIdleTime, setMaxReadBufferSize, setMinReadBufferSize, setReadBufferSize, setReaderIdleTime, setThroughputCalculationInterval, setUseReadOperation, setWriterIdleTime, setWriteTimeout
-
-
-
-
Method Detail
-
isKeepAlive
public boolean isKeepAlive()
- Returns:
trueifSO_KEEPALIVEis enabled.- See Also:
Socket.getKeepAlive()
-
setKeepAlive
public void setKeepAlive(boolean on)
- Parameters:
on- ifSO_KEEPALIVEis to be enabled- See Also:
Socket.setKeepAlive(boolean)
-
isOobInline
public boolean isOobInline()
not supported for the moment- Returns:
trueifSO_OOBINLINEis enabled.- See Also:
Socket.getOOBInline()
-
setOobInline
public void setOobInline(boolean on)
not supported for the moment- Parameters:
on- ifSO_OOBINLINEis to be enabled- See Also:
Socket.setOOBInline(boolean)
-
isReuseAddress
public boolean isReuseAddress()
- Returns:
trueif SO_REUSEADDR is enabled.- See Also:
Socket.getReuseAddress()
-
setReuseAddress
public void setReuseAddress(boolean on)
- Parameters:
on- Tells if SO_REUSEADDR is enabled or disabled- See Also:
Socket.setReuseAddress(boolean)
-
getSoLinger
public 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
public void setSoLinger(int linger)
Please note that enablingSO_LINGERin Java NIO can result in platform-dependent behavior and unexpected blocking of I/O thread.- Parameters:
linger- Please specify a negative value to disableSO_LINGER.- See Also:
Socket.setSoLinger(boolean, int), Sun Bug Database
-
isTcpNoDelay
public boolean isTcpNoDelay()
- Returns:
trueifTCP_NODELAYis enabled.- See Also:
Socket.getTcpNoDelay()
-
setTcpNoDelay
public void setTcpNoDelay(boolean on)
- Parameters:
on-trueifTCP_NODELAYis to be enabled- See Also:
Socket.setTcpNoDelay(boolean)
-
getTrafficClass
public int getTrafficClass()
- Returns:
- the traffic class
- See Also:
Socket.getTrafficClass()
-
setTrafficClass
public void setTrafficClass(int tc)
- Parameters:
tc- The traffic class to set, one ofIPTOS_LOWCOST(0x02)IPTOS_RELIABILITY(0x04),IPTOS_THROUGHPUT(0x08) orIPTOS_LOWDELAY(0x10)- See Also:
Socket.setTrafficClass(int)
-
getSendBufferSize
public int getSendBufferSize()
- Returns:
- the size of the send buffer
- See Also:
Socket.getSendBufferSize()
-
setSendBufferSize
public void setSendBufferSize(int size)
- Parameters:
size- The size of the send buffer- See Also:
Socket.setSendBufferSize(int)
-
getReceiveBufferSize
public int getReceiveBufferSize()
- Returns:
- the size of the receive buffer
- See Also:
Socket.getReceiveBufferSize()
-
setReceiveBufferSize
public void setReceiveBufferSize(int size)
- Parameters:
size- The size of the receive buffer- See Also:
Socket.setReceiveBufferSize(int)
-
-