public class DefaultTcpSessionConfig extends AbstractIoSessionConfig implements TcpSessionConfig
Constructor and Description |
---|
DefaultTcpSessionConfig() |
Modifier and Type | Method and Description |
---|---|
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() |
Boolean |
isKeepAlive() |
Boolean |
isOobInline() |
boolean |
isSecured()
Tells if the session provides some encryption (SSL/TLS)
|
Boolean |
isTcpNoDelay() |
void |
setKeepAlive(boolean keepAlive) |
void |
setOobInline(boolean oobInline) |
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)
Inject a
SSLContex valid for the session. |
void |
setTcpNoDelay(boolean tcpNoDelay) |
getIdleTimeInMillis, getReadBufferSize, getSendBufferSize, getTimeout, getTrafficClass, isReuseAddress, setIdleTimeInMillis, setReadBufferSize, setReuseAddress, setSendBufferSize, setTimeout, setTrafficClass, setTrafficClass
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIdleTimeInMillis, getReadBufferSize, getSendBufferSize, getTimeout, getTrafficClass, isReuseAddress, setIdleTimeInMillis, setReadBufferSize, setReuseAddress, setSendBufferSize, setTimeout, setTrafficClass, setTrafficClass
public Boolean isTcpNoDelay()
isTcpNoDelay
in interface TcpSessionConfig
Socket.getTcpNoDelay()
public void setTcpNoDelay(boolean tcpNoDelay)
setTcpNoDelay
in interface TcpSessionConfig
Socket.setTcpNoDelay(boolean)
public Boolean isKeepAlive()
isKeepAlive
in interface TcpSessionConfig
return null
if the default system value is used
public void setKeepAlive(boolean keepAlive)
setKeepAlive
in interface TcpSessionConfig
Socket.setKeepAlive(boolean)
public Boolean isOobInline()
isOobInline
in interface TcpSessionConfig
return null
if the default system value is used
public void setOobInline(boolean oobInline)
setOobInline
in interface TcpSessionConfig
Socket.setOOBInline(boolean)
public Integer getSoLinger()
getSoLinger
in interface TcpSessionConfig
Socket.getSoLinger()
,
Sun Bug Database
return null
if the default system value is usedpublic void setSoLinger(int soLinger)
setSoLinger
in interface TcpSessionConfig
soLinger
- Please specify a negative value to disable SO_LINGER.Socket.setSoLinger(boolean, int)
,
Sun Bug Databasepublic void setSslContext(SSLContext sslContext)
SSLContex
valid for the session. This SSLContex
will be used
by the SSLEngine to handle secured connections.SSLContex
must have been created and initialized before being injected in
the configuration.SSLContext
, the session switch to secured.setSslContext
in interface TcpSessionConfig
sslContext
- The configured SSLContex
.public SSLContext getSslContext()
getSslContext
in interface TcpSessionConfig
SSLContext
instance stored in the configuration.public boolean isSecured()
isSecured
in interface TcpSessionConfig
true
if the session is securedCopyright © 2009–2013 Apache MINA Project. All rights reserved.