org.apache.avalon.cornerstone.blocks.threads
Class AbstractThreadManager
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.avalon.cornerstone.blocks.threads.AbstractThreadManager
- All Implemented Interfaces:
- Configurable, Disposable, LogEnabled, ThreadManager
- Direct Known Subclasses:
- DefaultThreadManager, ResourceLimitingThreadManager
- public abstract class AbstractThreadManager
- extends AbstractLogEnabled
- implements ThreadManager, Configurable, Disposable
Abstract implementation of ThreadManager.
- Author:
- Avalon Development Team
Fields inherited from interface org.apache.avalon.cornerstone.services.threads.ThreadManager |
ROLE |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractThreadManager
public AbstractThreadManager()
configure
public void configure(Configuration configuration)
throws ConfigurationException
- Setup thread pools based on configuration data.
- Specified by:
configure
in interface Configurable
- Parameters:
configuration
- the configuration data
- Throws:
ConfigurationException
- if an error occurs
dispose
public void dispose()
- Description copied from interface:
Disposable
- The dispose operation is called at the end of a components lifecycle.
This method will be called after Startable.stop() method (if implemented
by component). Components use this method to release and destroy any
resources that the Component owns.
- Specified by:
dispose
in interface Disposable
configureThreadPool
protected abstract void configureThreadPool(java.util.Map threadPools,
Configuration configuration)
throws ConfigurationException
- Throws:
ConfigurationException
getThreadPool
public ThreadPool getThreadPool(java.lang.String name)
throws java.lang.IllegalArgumentException
- Retrieve a thread pool by name.
- Specified by:
getThreadPool
in interface ThreadManager
- Parameters:
name
- the name of thread pool
- Returns:
- the threadpool
- Throws:
java.lang.IllegalArgumentException
- if the name of thread pool is
invalid or named pool does not exist
getDefaultThreadPool
public ThreadPool getDefaultThreadPool()
- Retrieve the default thread pool.
- Specified by:
getDefaultThreadPool
in interface ThreadManager
- Returns:
- the thread pool
Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.