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 java.lang.Object implements org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean
SpringFactoryBean
which makes it possible to set up a MINAExecutorThreadModel
using Spring. TheserviceName
property must be set usingsetServiceName(String)
.
-
-
Constructor Summary
Constructors Constructor Description ExecutorThreadModelFactoryBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
java.lang.Object
getObject()
java.lang.Class
getObjectType()
boolean
isSingleton()
void
setExecutor(java.util.concurrent.Executor executor)
Sets theExecutor
to use.void
setServiceName(java.lang.String serviceName)
Sets the name of the service as used in the call toExecutorThreadModel.getInstance(String)
.
-
-
-
Method Detail
-
setExecutor
public void setExecutor(java.util.concurrent.Executor executor)
Sets theExecutor
to use. If not set a defaultExecutor
will be used by theExecutorThreadModel
created by this factory bean.- Parameters:
executor
- the executor.- Throws:
java.lang.IllegalArgumentException
- if the specified value isnull
.
-
setServiceName
public void setServiceName(java.lang.String serviceName)
Sets the name of the service as used in the call toExecutorThreadModel.getInstance(String)
. This property is required.- Parameters:
executor
- the executor.- Throws:
java.lang.IllegalArgumentException
- if the specified value isnull
.
-
getObjectType
public java.lang.Class getObjectType()
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean
-
getObject
public java.lang.Object getObject() throws java.lang.Exception
- Specified by:
getObject
in interfaceorg.springframework.beans.factory.FactoryBean
- Throws:
java.lang.Exception
-
isSingleton
public boolean isSingleton()
- Specified by:
isSingleton
in interfaceorg.springframework.beans.factory.FactoryBean
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
-
-