public abstract class AbstractThreadManager
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements org.apache.avalon.cornerstone.services.threads.ThreadManager, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Disposable
| Modifier and Type | Field and Description |
|---|---|
private java.util.HashMap |
m_threadPools |
| Constructor and Description |
|---|
AbstractThreadManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
Setup thread pools based on configuration data.
|
protected abstract void |
configureThreadPool(java.util.Map threadPools,
org.apache.avalon.framework.configuration.Configuration configuration) |
void |
dispose() |
org.apache.excalibur.thread.ThreadPool |
getDefaultThreadPool()
Retrieve the default thread pool.
|
org.apache.excalibur.thread.ThreadPool |
getThreadPool(java.lang.String name)
Retrieve a thread pool by name.
|
public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableconfiguration - the configuration dataorg.apache.avalon.framework.configuration.ConfigurationException - if an error occurspublic void dispose()
dispose in interface org.apache.avalon.framework.activity.Disposableprotected abstract void configureThreadPool(java.util.Map threadPools,
org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
org.apache.avalon.framework.configuration.ConfigurationExceptionpublic org.apache.excalibur.thread.ThreadPool getThreadPool(java.lang.String name)
throws java.lang.IllegalArgumentException
getThreadPool in interface org.apache.avalon.cornerstone.services.threads.ThreadManagername - the name of thread pooljava.lang.IllegalArgumentException - if the name of thread pool is
invalid or named pool does not existpublic org.apache.excalibur.thread.ThreadPool getDefaultThreadPool()
getDefaultThreadPool in interface org.apache.avalon.cornerstone.services.threads.ThreadManager