|
|||||||||
| 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 Sessions. 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 ByteOrderof ByteBuffers that are passed to
Messages. |
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 ByteOrderof ByteBuffers that are passed to
Messages. |
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 SessionConfigMBeanpublic int getConnectTimeoutInMillis()
public void setConnectTimeout(int connectTimeout)
ConnectExceptionwill be thrown if the specified time
passes. Default value is 0 (disabled).
setConnectTimeout in interface SessionConfigMBeanIllegalArgumentException - if the specified timeout is too big or less than
0.public int getIdleTime()
getIdleTime in interface SessionConfigMBeanpublic int getIdleTimeInMillis()
public void setIdleTime(int idleTime)
idleTime seconds, it will generate
sessionIdle event. Specify 0 to disable.
setIdleTime in interface SessionConfigMBeanIllegalArgumentException - 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 SessionConfigMBeanpublic 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 SessionConfigMBeanpublic int getWriteTimeout()
SocketTimeoutExceptionif it takes too long to flush the
write buffer. This is useful dropping too slow clients. Default value is
0 (disabled).
getWriteTimeout in interface SessionConfigMBean0 if disabled.public int getWriteTimeoutInMillis()
SocketTimeoutExceptionif 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)
SocketTimeoutExceptionif it takes too long to flush the
write buffer. This is useful dropping too slow clients. Default value is
0 (disabled).
setWriteTimeout in interface SessionConfigMBeanIllegalArgumentException - if the specified value is less than 0.public ByteOrder getByteOrder()
ByteOrderof ByteBuffers that are passed to
Messages. The default value is ByteOrder.BIG_ENDIAN.
public void setByteOrder(ByteOrder byteOrder)
ByteOrderof ByteBuffers that are passed to
Messages. 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 | ||||||||