public abstract class AbstractIoSessionConfig extends Object implements IoSessionConfig
Constructor and Description |
---|
AbstractIoSessionConfig() |
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
|
public long getIdleTimeInMillis(IdleStatus status)
getIdleTimeInMillis
in interface IoSessionConfig
-1
if no idle time configured for this statusIdleStatus
public void setIdleTimeInMillis(IdleStatus status, long ildeTimeInMilli)
IoSession
is considered idle for a given
operation type (read/write/both) @see IdleStatussetIdleTimeInMillis
in interface IoSessionConfig
status
- the type of idle (read/write/both) timeout to setildeTimeInMilli
- the timeout in milliseconds (-1
for no idle detection on this status)public Integer getReadBufferSize()
getReadBufferSize
in interface IoSessionConfig
public void setReadBufferSize(int readBufferSize)
setReadBufferSize
in interface IoSessionConfig
readBufferSize
- The buffer size used to read data from the socketpublic Integer getSendBufferSize()
getSendBufferSize
in interface IoSessionConfig
DatagramSocket.getSendBufferSize()
public void setSendBufferSize(int sendBufferSize)
setSendBufferSize
in interface IoSessionConfig
sendBufferSize
- The buffer size used to send data into the socketpublic int getTrafficClass()
getTrafficClass
in interface IoSessionConfig
Socket.getTrafficClass()
public void setTrafficClass(TrafficClassEnum trafficClass)
setTrafficClass
in interface IoSessionConfig
trafficClass
- The ToS to setSocket.setTrafficClass(int)
public void setTrafficClass(int trafficClass)
setTrafficClass
in interface IoSessionConfig
trafficClass
- The ToS to setSocket.setTrafficClass(int)
public Boolean isReuseAddress()
isReuseAddress
in interface IoSessionConfig
Socket.getReuseAddress()
public void setReuseAddress(boolean reuseAddress)
setReuseAddress
in interface IoSessionConfig
Socket.setReuseAddress(boolean)
,
return null
if the default system value is used
public Integer getTimeout()
getTimeout
in interface IoSessionConfig
Socket.getSoTimeout()
,
DatagramSocket.getSoTimeout()
public void setTimeout(int timeout)
setTimeout
in interface IoSessionConfig
timeout
- The timeout to set, in milliseconds. 0 means infiniteSocket.setSoTimeout(int)
,
DatagramSocket.setSoTimeout(int)
Copyright © 2009–2013 Apache MINA Project. All rights reserved.