org.apache.mina.common
Interface SessionConfig

All Known Implementing Classes:
BaseSessionConfig, DatagramSessionConfig, SocketSessionConfig, VmPipeSessionConfig

public interface SessionConfig

Provides general or TransportType-specific configuration.

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 );
 }
 

Version:
$Rev: 332218 $, $Date: 2005-11-10 12:52:42 +0900 $
Author:
The Apache Directory Project (dev@directory.apache.org)

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

getIdleTime

int getIdleTime(IdleStatus status)
Returns idle time for the specified type of idleness in seconds.


getIdleTimeInMillis

long getIdleTimeInMillis(IdleStatus status)
Returnd idle time for the specified type of idleness in milliseconds.


setIdleTime

void setIdleTime(IdleStatus status,
                 int idleTime)
Sets idle time for the specified type of idleness in seconds.


getWriteTimeout

int getWriteTimeout()
Returns write timeout in seconds.


getWriteTimeoutInMillis

long getWriteTimeoutInMillis()
Returns write timeout in milliseconds.


setWriteTimeout

void setWriteTimeout(int writeTimeout)
Sets write timeout in seconds.



Copyright © 2004-2005 . All Rights Reserved.