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 statusIdleStatuspublic void setIdleTimeInMillis(IdleStatus status, long ildeTimeInMilli)
IoSession is considered idle for a given
operation type (read/write/both) @see IdleStatussetIdleTimeInMillis in interface IoSessionConfigstatus - 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 IoSessionConfigpublic void setReadBufferSize(int readBufferSize)
setReadBufferSize in interface IoSessionConfigreadBufferSize - The buffer size used to read data from the socketpublic Integer getSendBufferSize()
getSendBufferSize in interface IoSessionConfigDatagramSocket.getSendBufferSize()public void setSendBufferSize(int sendBufferSize)
setSendBufferSize in interface IoSessionConfigsendBufferSize - The buffer size used to send data into the socketpublic int getTrafficClass()
getTrafficClass in interface IoSessionConfigSocket.getTrafficClass()public void setTrafficClass(TrafficClassEnum trafficClass)
setTrafficClass in interface IoSessionConfigtrafficClass - The ToS to setSocket.setTrafficClass(int)public void setTrafficClass(int trafficClass)
setTrafficClass in interface IoSessionConfigtrafficClass - The ToS to setSocket.setTrafficClass(int)public Boolean isReuseAddress()
isReuseAddress in interface IoSessionConfigSocket.getReuseAddress()public void setReuseAddress(boolean reuseAddress)
setReuseAddress in interface IoSessionConfigSocket.setReuseAddress(boolean),
return null if the default system value is usedpublic Integer getTimeout()
getTimeout in interface IoSessionConfigSocket.getSoTimeout(),
DatagramSocket.getSoTimeout()public void setTimeout(int timeout)
setTimeout in interface IoSessionConfigtimeout - The timeout to set, in milliseconds. 0 means infiniteSocket.setSoTimeout(int),
DatagramSocket.setSoTimeout(int)Copyright © 2009–2013 Apache MINA Project. All rights reserved.