Package org.apache.mina.common.support
Class BaseIoServiceConfig
- java.lang.Object
-
- org.apache.mina.common.support.BaseIoServiceConfig
-
- All Implemented Interfaces:
java.lang.Cloneable,IoServiceConfig
- Direct Known Subclasses:
BaseIoAcceptorConfig,BaseIoConnectorConfig
public abstract class BaseIoServiceConfig extends java.lang.Object implements IoServiceConfig, java.lang.Cloneable
A base implementation ofIoServiceConfig.
-
-
Constructor Summary
Constructors Constructor Description BaseIoServiceConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Returns a deep clone of this configuration.DefaultIoFilterChainBuildergetFilterChain()A shortcut for ( ( DefaultIoFilterChainBuilder )IoServiceConfig.getFilterChainBuilder()).IoFilterChainBuildergetFilterChainBuilder()Returns theIoFilterChainBuilderwhich will modify theIoFilterChainof allIoSessions which is created with this configuration.ThreadModelgetThreadModel()Returns the defaultThreadModelof theIoService.voidsetFilterChainBuilder(IoFilterChainBuilder builder)Sets theIoFilterChainBuilderwhich will modify theIoFilterChainof allIoSessions which is created with this configuration.voidsetThreadModel(ThreadModel threadModel)Sets the defaultThreadModelof theIoService.-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.mina.common.IoServiceConfig
getSessionConfig
-
-
-
-
Method Detail
-
getFilterChainBuilder
public IoFilterChainBuilder getFilterChainBuilder()
Description copied from interface:IoServiceConfigReturns theIoFilterChainBuilderwhich will modify theIoFilterChainof allIoSessions which is created with this configuration. The default value is an emptyDefaultIoFilterChainBuilder.- Specified by:
getFilterChainBuilderin interfaceIoServiceConfig
-
setFilterChainBuilder
public void setFilterChainBuilder(IoFilterChainBuilder builder)
Description copied from interface:IoServiceConfigSets theIoFilterChainBuilderwhich will modify theIoFilterChainof allIoSessions which is created with this configuration. If you specify null this property will be set to an emptyDefaultIoFilterChainBuilder.- Specified by:
setFilterChainBuilderin interfaceIoServiceConfig
-
getFilterChain
public DefaultIoFilterChainBuilder getFilterChain()
Description copied from interface:IoServiceConfigA shortcut for ( ( DefaultIoFilterChainBuilder )IoServiceConfig.getFilterChainBuilder()). Please note that the returned object is not a realIoFilterChainbut aDefaultIoFilterChainBuilder. Modifying the returned builder won't affect the existingIoSessions at all, becauseIoFilterChainBuilders affect only newly createdIoSessions.- Specified by:
getFilterChainin interfaceIoServiceConfig
-
getThreadModel
public ThreadModel getThreadModel()
Description copied from interface:IoServiceConfigReturns the defaultThreadModelof theIoService. The default value is aExecutorThreadModel() whose service name is 'AnonymousIoService' and which has 16 maximum active threads. It is strongly recommended to set a newExecutorThreadModelby callingExecutorThreadModel.getInstance(String).- Specified by:
getThreadModelin interfaceIoServiceConfig
-
setThreadModel
public void setThreadModel(ThreadModel threadModel)
Description copied from interface:IoServiceConfigSets the defaultThreadModelof theIoService. If you specify null, this property will be set to the default value. The default value is anExecutorThreadModelwhose service name is 'AnonymousIoService' with 16 threads. It is strongly recommended to set a newExecutorThreadModelby callingExecutorThreadModel.getInstance(String).- Specified by:
setThreadModelin interfaceIoServiceConfig
-
clone
public java.lang.Object clone()
Description copied from interface:IoServiceConfigReturns a deep clone of this configuration.- Specified by:
clonein interfaceIoServiceConfig- Overrides:
clonein classjava.lang.Object
-
-