|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface SessionConfig
Provides general or TransportType-specific configuration.
idleTime (secs) - sessionIdle event is
enabled if this value is greater than 0.
writeTimeout (secs) - WriteTimeoutException is
thrown when the write buffer of session is full for the specified
time.
Please refer to SocketSessionConfig and DatagramSessionConfig
for TransportType-specific configurations.
SessionConfig can be obtained by Session.getConfig() and
by Session.getConfig(). To adjust
TransportType-specific settings, please downcast it:
public void sessionOpened( IoSession s )
{
( ( SocketSessionConfig ) s.getConfig() ).setReuseAddress( true );
}
| Method Summary | |
|---|---|
int |
getIdleTime(IdleStatus status)
Returns idle time for the specified type of idleness in seconds. |
long |
getIdleTimeInMillis(IdleStatus status)
Returnd idle time for the specified type of idleness in milliseconds. |
int |
getWriteTimeout()
Returns write timeout in seconds. |
long |
getWriteTimeoutInMillis()
Returns write timeout in milliseconds. |
void |
setIdleTime(IdleStatus status,
int idleTime)
Sets idle time for the specified type of idleness in seconds. |
void |
setWriteTimeout(int writeTimeout)
Sets write timeout in seconds. |
| Method Detail |
|---|
int getIdleTime(IdleStatus status)
long getIdleTimeInMillis(IdleStatus status)
void setIdleTime(IdleStatus status,
int idleTime)
int getWriteTimeout()
long getWriteTimeoutInMillis()
void setWriteTimeout(int writeTimeout)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||