org.apache.mina.common
Interface IoServiceConfig

All Known Subinterfaces:
IoAcceptorConfig, IoConnectorConfig
All Known Implementing Classes:
org.apache.mina.common.support.BaseIoAcceptorConfig, org.apache.mina.common.support.BaseIoConnectorConfig, org.apache.mina.common.support.BaseIoServiceConfig, DatagramAcceptorConfig, DatagramConnectorConfig, SocketAcceptorConfig, SocketConnectorConfig

public interface IoServiceConfig

A configuration which is used to configure IoService.

Version:
$Rev: 391231 $, $Date: 2006-04-04 15:21:55 +0900 (Tue, 04 Apr 2006) $
Author:
The Apache Directory Project (mina-dev@directory.apache.org)

Method Summary
 Object clone()
          Returns a deep clone of this configuration.
 DefaultIoFilterChainBuilder getFilterChain()
          A shortcut for ( ( DefaultIoFilterChainBuilder ) getFilterChainBuilder() ).
 IoFilterChainBuilder getFilterChainBuilder()
          Returns the IoFilterChainBuilder which will modify the IoFilterChain of all IoSessions which is created with this configuration.
 IoSessionConfig getSessionConfig()
          Resturns the default configuration of the new IoSessions.
 ThreadModel getThreadModel()
          Returns the default ThreadModel of the IoService.
 void setFilterChainBuilder(IoFilterChainBuilder builder)
          Sets the IoFilterChainBuilder which will modify the IoFilterChain of all IoSessions which is created with this configuration.
 void setThreadModel(ThreadModel threadModel)
          Sets the default ThreadModel of the IoService.
 

Method Detail

getSessionConfig

IoSessionConfig getSessionConfig()
Resturns the default configuration of the new IoSessions.


getFilterChainBuilder

IoFilterChainBuilder getFilterChainBuilder()
Returns the IoFilterChainBuilder which will modify the IoFilterChain of all IoSessions which is created with this configuration. The default value is an empty DefaultIoFilterChainBuilder.


setFilterChainBuilder

void setFilterChainBuilder(IoFilterChainBuilder builder)
Sets the IoFilterChainBuilder which will modify the IoFilterChain of all IoSessions which is created with this configuration. If you specify null this property will be set to an empty DefaultIoFilterChainBuilder.


getFilterChain

DefaultIoFilterChainBuilder getFilterChain()
A shortcut for ( ( DefaultIoFilterChainBuilder ) getFilterChainBuilder() ). Please note that the returned object is not a real IoFilterChain but a DefaultIoFilterChainBuilder. Modifying the returned builder won't affect the existing IoSessions at all, because IoFilterChainBuilders affect only newly created IoSessions.

Throws:
IllegalStateException - if the current IoFilterChainBuilder is not a DefaultIoFilterChainBuilder

getThreadModel

ThreadModel getThreadModel()
Returns the default ThreadModel of the IoService. The default value is new PooledThreadModel().


setThreadModel

void setThreadModel(ThreadModel threadModel)
Sets the default ThreadModel of the IoService. If you specify null, this property will be set to the default value. The default value is new PooledThreadModel().


clone

Object clone()
Returns a deep clone of this configuration.