org.apache.avalon.excalibur.system.handler
Class PoolableComponentHandler

java.lang.Object
  |
  +--org.apache.avalon.excalibur.system.handler.PoolableComponentHandler
All Implemented Interfaces:
ComponentHandler, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable

public class PoolableComponentHandler
extends java.lang.Object
implements ComponentHandler

The PoolableComponentHandler to make sure components are initialized and destroyed correctly.

Since:
4.0
Version:
CVS $Revision: 1.3 $ $Date: 2002/01/29 16:18:53 $
Author:
Berin Loritsch

Fields inherited from interface org.apache.avalon.excalibur.system.handler.ComponentHandler
HANDLER_CONSTRUCTOR
 
Constructor Summary
protected PoolableComponentHandler(java.lang.Class componentClass, org.apache.avalon.framework.configuration.Configuration config, org.apache.avalon.framework.component.ComponentManager manager, org.apache.avalon.framework.context.Context context)
          Create a ComponentHandler that takes care of hiding the details of whether a Component is ThreadSafe, Poolable, or SingleThreaded.
 
Method Summary
 void dispose()
          Dispose of the ComponentHandler and any associated Pools and Factories.
 org.apache.avalon.framework.component.Component get()
          Get a reference of the desired Component
 void initialize()
          Initialize the ComponentHandler.
 boolean isInitialized()
          Sometimes Components call other components during their initialization process.
 void put(org.apache.avalon.framework.component.Component component)
          Return a reference of the desired Component
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PoolableComponentHandler

protected PoolableComponentHandler(java.lang.Class componentClass,
                                   org.apache.avalon.framework.configuration.Configuration config,
                                   org.apache.avalon.framework.component.ComponentManager manager,
                                   org.apache.avalon.framework.context.Context context)
                            throws java.lang.Exception
Create a ComponentHandler that takes care of hiding the details of whether a Component is ThreadSafe, Poolable, or SingleThreaded. It falls back to SingleThreaded if not specified.
Method Detail

isInitialized

public boolean isInitialized()
Description copied from interface: ComponentHandler
Sometimes Components call other components during their initialization process. This is a quick test that the ComponentManager will perform before attempting to use the the ComponentHandler.
Specified by:
isInitialized in interface ComponentHandler

initialize

public void initialize()
Initialize the ComponentHandler.
Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable

get

public org.apache.avalon.framework.component.Component get()
                                                    throws java.lang.Exception
Get a reference of the desired Component
Specified by:
get in interface ComponentHandler

put

public void put(org.apache.avalon.framework.component.Component component)
Return a reference of the desired Component
Specified by:
put in interface ComponentHandler

dispose

public void dispose()
Dispose of the ComponentHandler and any associated Pools and Factories.
Specified by:
dispose in interface org.apache.avalon.framework.activity.Disposable


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.