public interface IoSessionConfig
IoSession
.Modifier and Type | Method and Description |
---|---|
long |
getIdleTimeInMillis(IdleStatus status)
Returns idle time for the specified type of idleness in milli-seconds.
|
Integer |
getReadBufferSize()
Returns the size of the read buffer that I/O processor allocates
per each read.
|
Integer |
getSendBufferSize() |
Integer |
getTimeout()
Get the SO_TIMEOUT set for this socket
|
int |
getTrafficClass() |
Boolean |
isReuseAddress() |
void |
setIdleTimeInMillis(IdleStatus status,
long ildeTimeInMilli)
Set the delay before an
IoSession is considered idle for a given
operation type (read/write/both) @see IdleStatus |
void |
setReadBufferSize(int readBufferSize)
Sets the size of the read buffer that I/O processor allocates
per each read.
|
void |
setReuseAddress(boolean reuseAddress) |
void |
setSendBufferSize(int sendBufferSize)
Sets the size of the buffer that I/O processor allocates
per each write.
|
void |
setTimeout(int timeOut)
Sets the SO_TIMEOUT option for this socket
|
void |
setTrafficClass(int trafficClass)
Set the ToS flag for this session
|
void |
setTrafficClass(TrafficClassEnum trafficClass)
Set the ToS flag for this session
|
Integer getReadBufferSize()
void setReadBufferSize(int readBufferSize)
readBufferSize
- The buffer size used to read data from the socketInteger getSendBufferSize()
DatagramSocket.getSendBufferSize()
void setSendBufferSize(int sendBufferSize)
sendBufferSize
- The buffer size used to send data into the socketlong getIdleTimeInMillis(IdleStatus status)
-1
if no idle time configured for this statusIdleStatus
void setIdleTimeInMillis(IdleStatus status, long ildeTimeInMilli)
IoSession
is considered idle for a given
operation type (read/write/both) @see IdleStatusstatus
- the type of idle (read/write/both) timeout to setildeTimeInMilli
- the timeout in milliseconds (-1
for no idle detection on this status)int getTrafficClass()
Socket.getTrafficClass()
void setTrafficClass(TrafficClassEnum trafficClass)
trafficClass
- The ToS to setSocket.setTrafficClass(int)
void setTrafficClass(int trafficClass)
trafficClass
- The ToS to setSocket.setTrafficClass(int)
Boolean isReuseAddress()
Socket.getReuseAddress()
void setReuseAddress(boolean reuseAddress)
Integer getTimeout()
Socket.getSoTimeout()
,
DatagramSocket.getSoTimeout()
void setTimeout(int timeOut)
timeOut
- The timeout to set, in milliseconds. 0 means infiniteSocket.setSoTimeout(int)
,
DatagramSocket.setSoTimeout(int)
Copyright © 2009–2013 Apache MINA Project. All rights reserved.