|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.gleamynode.netty2.SessionConfig
public class SessionConfig
Contains properties for Session
s. You can create one config object
and apply it calling Session.setConfig(SessionConfig)
method.
Session
Constructor Summary | |
---|---|
SessionConfig()
Creates a new instance with default settings. |
Method Summary | |
---|---|
ByteOrder |
getByteOrder()
Returns the ByteOrder of ByteBuffer s that are passed to
Message s. |
int |
getConnectTimeout()
Returns connect timeout in seconds. |
int |
getConnectTimeoutInMillis()
Returns connect timeout in milliseconds. |
int |
getIdleTime()
Returns the idle time of this session in seconds. |
int |
getIdleTimeInMillis()
Returns the idle time of this session in milliseconds. |
int |
getMaxQueuedWriteCount()
Returns the maximum number of remaining write requests which were queued by Session.write(Message) . |
int |
getWriteTimeout()
Returns write timeout in seconds. |
int |
getWriteTimeoutInMillis()
Returns write timeout in milliseconds. |
void |
setByteOrder(ByteOrder byteOrder)
Sets the ByteOrder of ByteBuffer s that are passed to
Message s. |
void |
setConnectTimeout(int connectTimeout)
Sets connect timeout in seconds. |
void |
setIdleTime(int idleTime)
Sets the idle time of this session in seconds. |
void |
setMaxQueuedWriteCount(int newLimit)
Sets the maximum number of remaining write requests which were queued by Session.write(Message) . |
void |
setWriteTimeout(int writeTimeout)
Sets write timeout in seconds. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SessionConfig()
Method Detail |
---|
public int getConnectTimeout()
getConnectTimeout
in interface SessionConfigMBean
public int getConnectTimeoutInMillis()
public void setConnectTimeout(int connectTimeout)
ConnectException
will be thrown if the specified time
passes. Default value is 0
(disabled).
setConnectTimeout
in interface SessionConfigMBean
IllegalArgumentException
- if the specified timeout is too big or less than
0
.public int getIdleTime()
getIdleTime
in interface SessionConfigMBean
public int getIdleTimeInMillis()
public void setIdleTime(int idleTime)
idleTime
seconds, it will generate
sessionIdle
event. Specify 0
to disable.
setIdleTime
in interface SessionConfigMBean
IllegalArgumentException
- if the specified time is too big or less tnan 0public int getMaxQueuedWriteCount()
Session.write(Message)
. If the number of remaining write
requests exceeds this value, Session.write(Message)
method will
block. The default value is 0
(disabled).
getMaxQueuedWriteCount
in interface SessionConfigMBean
public void setMaxQueuedWriteCount(int newLimit)
Session.write(Message)
. If the number of remaining write
requests exceeds this value, Session.write(Message)
method will
block. The default value is 0
(disabled).
setMaxQueuedWriteCount
in interface SessionConfigMBean
public int getWriteTimeout()
SocketTimeoutException
if it takes too long to flush the
write buffer. This is useful dropping too slow clients. Default value is
0
(disabled).
getWriteTimeout
in interface SessionConfigMBean
0
if disabled.public int getWriteTimeoutInMillis()
SocketTimeoutException
if it takes too long to flush the
write buffer. This is useful dropping too slow clients. Default value is
0
(disabled).
0
if disabled.public void setWriteTimeout(int writeTimeout)
SocketTimeoutException
if it takes too long to flush the
write buffer. This is useful dropping too slow clients. Default value is
0
(disabled).
setWriteTimeout
in interface SessionConfigMBean
IllegalArgumentException
- if the specified value is less than 0
.public ByteOrder getByteOrder()
ByteOrder
of ByteBuffer
s that are passed to
Message
s. The default value is ByteOrder.BIG_ENDIAN
.
public void setByteOrder(ByteOrder byteOrder)
ByteOrder
of ByteBuffer
s that are passed to
Message
s. Changing the order does not affect currently
communicating sessions. The default value is ByteOrder.BIG_ENDIAN
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |