|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.beans.factory.config.AbstractFactoryBean
org.apache.mina.integration.spring.ThreadPoolExecutorFactoryBean
public class ThreadPoolExecutorFactoryBean
Spring FactoryBean
which enables the configuration of
ThreadPoolExecutor
instances using Spring. Most of this code
has been copied from the ThreadPoolTaskExecutor
class
available in Spring 2.0.
Field Summary |
---|
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean |
---|
logger |
Constructor Summary | |
---|---|
ThreadPoolExecutorFactoryBean()
|
Method Summary | |
---|---|
protected java.lang.Object |
createInstance()
|
protected void |
destroyInstance(java.lang.Object o)
|
java.lang.Class |
getObjectType()
|
void |
setCorePoolSize(int corePoolSize)
Set the ThreadPoolExecutor's core pool size. |
void |
setKeepAliveSeconds(int keepAliveSeconds)
Set the ThreadPoolExecutor's keep alive seconds. |
void |
setMaxPoolSize(int maxPoolSize)
Set the ThreadPoolExecutor's maximum pool size. |
void |
setQueueCapacity(int queueCapacity)
Set the capacity for the ThreadPoolExecutor's BlockingQueue. |
void |
setRejectedExecutionHandler(java.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)
Set the RejectedExecutionHandler to use for the ThreadPoolExecutor. |
void |
setThreadFactory(java.util.concurrent.ThreadFactory threadFactory)
Set the ThreadFactory to use for the ThreadPoolExecutor's thread pool. |
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean |
---|
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ThreadPoolExecutorFactoryBean()
Method Detail |
---|
public void setCorePoolSize(int corePoolSize)
public void setMaxPoolSize(int maxPoolSize)
Integer.MAX_VALUE
.
public void setKeepAliveSeconds(int keepAliveSeconds)
public void setQueueCapacity(int queueCapacity)
Integer.MAX_VALUE
.
Any positive value will lead to a LinkedBlockingQueue instance; any other value will lead to a SynchronousQueue instance.
LinkedBlockingQueue
,
SynchronousQueue
public void setThreadFactory(java.util.concurrent.ThreadFactory threadFactory)
Executors.defaultThreadFactory()
public void setRejectedExecutionHandler(java.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)
ThreadPoolExecutor.AbortPolicy
protected java.lang.Object createInstance() throws java.lang.Exception
createInstance
in class org.springframework.beans.factory.config.AbstractFactoryBean
java.lang.Exception
protected void destroyInstance(java.lang.Object o) throws java.lang.Exception
destroyInstance
in class org.springframework.beans.factory.config.AbstractFactoryBean
java.lang.Exception
public java.lang.Class getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean
getObjectType
in class org.springframework.beans.factory.config.AbstractFactoryBean
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |