Class ExecutorThreadModelFactoryBean
java.lang.Object
org.apache.mina.integration.spring.ExecutorThreadModelFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean
,org.springframework.beans.factory.InitializingBean
public class ExecutorThreadModelFactoryBean
extends Object
implements org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean
Spring
FactoryBean
which makes it possible to set up a MINA
ExecutorThreadModel
using Spring. The serviceName
property must be set using setServiceName(String)
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
void
setExecutor
(Executor executor) Sets theExecutor
to use.void
setServiceName
(String serviceName) Sets the name of the service as used in the call toExecutorThreadModel.getInstance(String)
.
-
Constructor Details
-
ExecutorThreadModelFactoryBean
public ExecutorThreadModelFactoryBean()
-
-
Method Details
-
setExecutor
Sets theExecutor
to use. If not set a defaultExecutor
will be used by theExecutorThreadModel
created by this factory bean.- Parameters:
executor
- the executor.- Throws:
IllegalArgumentException
- if the specified value isnull
.
-
setServiceName
Sets the name of the service as used in the call toExecutorThreadModel.getInstance(String)
. This property is required.- Parameters:
executor
- the executor.- Throws:
IllegalArgumentException
- if the specified value isnull
.
-
getObjectType
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean
-
getObject
- Specified by:
getObject
in interfaceorg.springframework.beans.factory.FactoryBean
- Throws:
Exception
-
isSingleton
public boolean isSingleton()- Specified by:
isSingleton
in interfaceorg.springframework.beans.factory.FactoryBean
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-