Package org.apache.mina.common
Interface IoServiceConfig
- All Superinterfaces:
Cloneable
- All Known Subinterfaces:
DatagramServiceConfig
,IoAcceptorConfig
,IoConnectorConfig
- All Known Implementing Classes:
BaseIoAcceptorConfig
,BaseIoConnectorConfig
,BaseIoServiceConfig
,DatagramAcceptorConfig
,DatagramConnectorConfig
,SocketAcceptorConfig
,SocketConnectorConfig
A configuration which is used to configure
IoService
.-
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a deep clone of this configuration.A shortcut for ( ( DefaultIoFilterChainBuilder )getFilterChainBuilder()
).Returns theIoFilterChainBuilder
which will modify theIoFilterChain
of allIoSession
s which is created with this configuration.Resturns the default configuration of the newIoSession
s.Returns the defaultThreadModel
of theIoService
.void
Sets theIoFilterChainBuilder
which will modify theIoFilterChain
of allIoSession
s which is created with this configuration.void
setThreadModel
(ThreadModel threadModel) Sets the defaultThreadModel
of theIoService
.
-
Method Details
-
getSessionConfig
IoSessionConfig getSessionConfig()Resturns the default configuration of the newIoSession
s. -
getFilterChainBuilder
IoFilterChainBuilder getFilterChainBuilder()Returns theIoFilterChainBuilder
which will modify theIoFilterChain
of allIoSession
s which is created with this configuration. The default value is an emptyDefaultIoFilterChainBuilder
. -
setFilterChainBuilder
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
. -
getFilterChain
DefaultIoFilterChainBuilder getFilterChain()A shortcut for ( ( DefaultIoFilterChainBuilder )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.- Throws:
IllegalStateException
- if the currentIoFilterChainBuilder
is not aDefaultIoFilterChainBuilder
-
getThreadModel
ThreadModel getThreadModel()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)
. -
setThreadModel
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)
. -
clone
Object clone()Returns a deep clone of this configuration.
-