public class ProxyTcpSessionConfig extends Object implements TcpSessionConfig
| Constructor and Description |
|---|
ProxyTcpSessionConfig(Socket socket) |
| 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 |
getSoLinger()
Please note that enabling SO_LINGER in Java NIO can result
in platform-dependent behavior and unexpected blocking of I/O thread.
|
SSLContext |
getSslContext() |
Integer |
getTimeout()
Get the SO_TIMEOUT set for this socket
|
int |
getTrafficClass() |
Boolean |
isKeepAlive() |
Boolean |
isOobInline() |
Boolean |
isReuseAddress() |
boolean |
isSecured()
Tells if the session provides some encryption (SSL/TLS)
|
Boolean |
isTcpNoDelay() |
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 |
setKeepAlive(boolean keepAlive) |
void |
setOobInline(boolean oobInline) |
void |
setReadBufferSize(int receiveBufferSize)
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 |
setSoLinger(int soLinger)
Please note that enabling SO_LINGER in Java NIO can result
in platform-dependent behavior and unexpected blocking of I/O thread.
|
void |
setSslContext(SSLContext sslContext) |
void |
setTcpNoDelay(boolean tcpNoDelay) |
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 ProxyTcpSessionConfig(Socket socket)
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 Boolean isTcpNoDelay()
isTcpNoDelay in interface TcpSessionConfigSocket.getTcpNoDelay()public void setTcpNoDelay(boolean tcpNoDelay)
setTcpNoDelay in interface TcpSessionConfigSocket.setTcpNoDelay(boolean)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 getReadBufferSize()
getReadBufferSize in interface IoSessionConfigpublic void setReadBufferSize(int receiveBufferSize)
setReadBufferSize in interface IoSessionConfigreceiveBufferSize - 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(int trafficClass)
setTrafficClass in interface IoSessionConfigtrafficClass - The ToS to setSocket.setTrafficClass(int)public void setTrafficClass(TrafficClassEnum trafficClass)
setTrafficClass in interface IoSessionConfigtrafficClass - The ToS to setSocket.setTrafficClass(int)public Boolean isKeepAlive()
isKeepAlive in interface TcpSessionConfigreturn null if the default system value is usedpublic void setKeepAlive(boolean keepAlive)
setKeepAlive in interface TcpSessionConfigSocket.setKeepAlive(boolean)public Boolean isOobInline()
isOobInline in interface TcpSessionConfigreturn null if the default system value is usedpublic void setOobInline(boolean oobInline)
setOobInline in interface TcpSessionConfigSocket.setOOBInline(boolean)public Integer getSoLinger()
getSoLinger in interface TcpSessionConfigSocket.getSoLinger(),
Sun Bug Database
return null if the default system value is usedpublic void setSoLinger(int soLinger)
setSoLinger in interface TcpSessionConfigsoLinger - Please specify a negative value to disable SO_LINGER.Socket.setSoLinger(boolean, int),
Sun Bug Databasepublic boolean isSecured()
isSecured in interface TcpSessionConfigtrue if the session is securedpublic SSLContext getSslContext()
getSslContext in interface TcpSessionConfigSSLContext instance stored in the configuration.public void setSslContext(SSLContext sslContext)
setSslContext in interface TcpSessionConfigpublic 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.