Package org.apache.mina.common
Interface IoServiceConfig
-
- All Superinterfaces:
java.lang.Cloneable
- All Known Subinterfaces:
DatagramServiceConfig,IoAcceptorConfig,IoConnectorConfig
- All Known Implementing Classes:
BaseIoAcceptorConfig,BaseIoConnectorConfig,BaseIoServiceConfig,DatagramAcceptorConfig,DatagramConnectorConfig,SocketAcceptorConfig,SocketConnectorConfig
public interface IoServiceConfig extends java.lang.CloneableA configuration which is used to configureIoService.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Objectclone()Returns a deep clone of this configuration.DefaultIoFilterChainBuildergetFilterChain()A shortcut for ( ( DefaultIoFilterChainBuilder )getFilterChainBuilder()).IoFilterChainBuildergetFilterChainBuilder()Returns theIoFilterChainBuilderwhich will modify theIoFilterChainof allIoSessions which is created with this configuration.IoSessionConfiggetSessionConfig()Resturns the default configuration of the newIoSessions.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.
-
-
-
Method Detail
-
getSessionConfig
IoSessionConfig getSessionConfig()
Resturns the default configuration of the newIoSessions.
-
getFilterChainBuilder
IoFilterChainBuilder getFilterChainBuilder()
Returns theIoFilterChainBuilderwhich will modify theIoFilterChainof allIoSessions which is created with this configuration. The default value is an emptyDefaultIoFilterChainBuilder.
-
setFilterChainBuilder
void setFilterChainBuilder(IoFilterChainBuilder builder)
Sets theIoFilterChainBuilderwhich will modify theIoFilterChainof allIoSessions which is created with this configuration. If you specify null this property will be set to an emptyDefaultIoFilterChainBuilder.
-
getFilterChain
DefaultIoFilterChainBuilder getFilterChain()
A shortcut for ( ( DefaultIoFilterChainBuilder )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.- Throws:
java.lang.IllegalStateException- if the currentIoFilterChainBuilderis not aDefaultIoFilterChainBuilder
-
getThreadModel
ThreadModel getThreadModel()
Returns 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).
-
setThreadModel
void setThreadModel(ThreadModel threadModel)
Sets 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).
-
clone
java.lang.Object clone()
Returns a deep clone of this configuration.
-
-