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.Object
clone()
Returns a deep clone of this configuration.DefaultIoFilterChainBuilder
getFilterChain()
A shortcut for ( ( DefaultIoFilterChainBuilder )IoServiceConfig.getFilterChainBuilder()
).IoFilterChainBuilder
getFilterChainBuilder()
Returns theIoFilterChainBuilder
which will modify theIoFilterChain
of allIoSession
s which is created with this configuration.ThreadModel
getThreadModel()
Returns the defaultThreadModel
of theIoService
.void
setFilterChainBuilder(IoFilterChainBuilder builder)
Sets theIoFilterChainBuilder
which will modify theIoFilterChain
of allIoSession
s which is created with this configuration.void
setThreadModel(ThreadModel threadModel)
Sets the defaultThreadModel
of 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:IoServiceConfig
Returns theIoFilterChainBuilder
which will modify theIoFilterChain
of allIoSession
s which is created with this configuration. The default value is an emptyDefaultIoFilterChainBuilder
.- Specified by:
getFilterChainBuilder
in interfaceIoServiceConfig
-
setFilterChainBuilder
public void setFilterChainBuilder(IoFilterChainBuilder builder)
Description copied from interface:IoServiceConfig
Sets theIoFilterChainBuilder
which will modify theIoFilterChain
of allIoSession
s which is created with this configuration. If you specify null this property will be set to an emptyDefaultIoFilterChainBuilder
.- Specified by:
setFilterChainBuilder
in interfaceIoServiceConfig
-
getFilterChain
public DefaultIoFilterChainBuilder getFilterChain()
Description copied from interface:IoServiceConfig
A shortcut for ( ( DefaultIoFilterChainBuilder )IoServiceConfig.getFilterChainBuilder()
). Please note that the returned object is not a realIoFilterChain
but aDefaultIoFilterChainBuilder
. Modifying the returned builder won't affect the existingIoSession
s at all, becauseIoFilterChainBuilder
s affect only newly createdIoSession
s.- Specified by:
getFilterChain
in interfaceIoServiceConfig
-
getThreadModel
public ThreadModel getThreadModel()
Description copied from interface:IoServiceConfig
Returns the defaultThreadModel
of 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 newExecutorThreadModel
by callingExecutorThreadModel.getInstance(String)
.- Specified by:
getThreadModel
in interfaceIoServiceConfig
-
setThreadModel
public void setThreadModel(ThreadModel threadModel)
Description copied from interface:IoServiceConfig
Sets the defaultThreadModel
of theIoService
. If you specify null, this property will be set to the default value. The default value is anExecutorThreadModel
whose service name is 'AnonymousIoService' with 16 threads. It is strongly recommended to set a newExecutorThreadModel
by callingExecutorThreadModel.getInstance(String)
.- Specified by:
setThreadModel
in interfaceIoServiceConfig
-
clone
public java.lang.Object clone()
Description copied from interface:IoServiceConfig
Returns a deep clone of this configuration.- Specified by:
clone
in interfaceIoServiceConfig
- Overrides:
clone
in classjava.lang.Object
-
-