org.apache.avalon.fortress.impl.handler
Class PoolableComponentHandler
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLogEnabled
|
+--org.apache.excalibur.instrument.AbstractLogEnabledInstrumentable
|
+--org.apache.avalon.fortress.impl.handler.AbstractComponentHandler
|
+--org.apache.avalon.fortress.impl.handler.PoolableComponentHandler
- All Implemented Interfaces:
- ComponentHandler, Configurable, Disposable, Initializable, Instrumentable, LogEnabled, Serviceable
- public final class PoolableComponentHandler
- extends AbstractComponentHandler
- implements Configurable
The PoolableComponentHandler to make sure components are initialized
and destroyed correctly.
- Since:
- 4.0
- Version:
- CVS $Revision: 1.8 $ $Date: 2003/04/18 20:02:29 $
- Author:
- Avalon Development Team
Method Summary |
void |
configure(Configuration configuration)
Configuration of the handler under which the minimum pool size
is established. |
protected Object |
doGet()
Get a reference of the desired Component |
protected void |
doPrepare()
Initialize the ComponentHandler. |
protected void |
doPut(Object component)
Return a reference of the desired Component |
void |
service(ServiceManager serviceManager)
Application of suporting services to the handler. |
PoolableComponentHandler
public PoolableComponentHandler()
service
public void service(ServiceManager serviceManager)
throws ServiceException
- Application of suporting services to the handler.
- Specified by:
service
in interface Serviceable
- Overrides:
service
in class AbstractComponentHandler
- Parameters:
serviceManager
- the service manager
- Throws:
ServiceException
- if a service related error occurs- Avalon Component Dependency:
- type="PoolManager"
configure
public void configure(Configuration configuration)
throws ConfigurationException
- Configuration of the handler under which the minimum pool size
is established.
- Specified by:
configure
in interface Configurable
- Parameters:
configuration
- the configuration fragment
- Throws:
ConfigurationException
- if the supplied configuration attribute
for 'pool-min' cannot be resolved to an integer value
doPrepare
protected void doPrepare()
throws Exception
- Initialize the ComponentHandler.
- Overrides:
doPrepare
in class AbstractComponentHandler
- Throws:
Exception
- if an error occurs
doGet
protected Object doGet()
throws Exception
- Get a reference of the desired Component
- Specified by:
doGet
in class AbstractComponentHandler
- Returns:
- the service
- Throws:
Exception
- if an error occurs
doPut
protected void doPut(Object component)
- Return a reference of the desired Component
- Overrides:
doPut
in class AbstractComponentHandler
- Parameters:
component
- the component to return to the handler
Copyright © 2000-2002 Apache Avalon Project. All Rights Reserved.