org.apache.avalon.fortress.impl.handler
Class FactoryComponentHandler

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.excalibur.instrument.AbstractLogEnabledInstrumentable
          extended by org.apache.avalon.fortress.impl.handler.AbstractComponentHandler
              extended by org.apache.avalon.fortress.impl.handler.FactoryComponentHandler
All Implemented Interfaces:
ComponentHandler, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, Instrumentable

public final class FactoryComponentHandler
extends AbstractComponentHandler

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

Since:
4.0
Version:
CVS $Revision: 1.8 $ $Date: 2004/02/28 15:16:25 $
Author:
Avalon Development Team

Field Summary
 
Fields inherited from class org.apache.avalon.fortress.impl.handler.AbstractComponentHandler
m_disposed, m_factory, m_logger, m_loggerManager, m_prepared
 
Fields inherited from interface org.apache.excalibur.instrument.Instrumentable
EMPTY_INSTRUMENT_ARRAY, EMPTY_INSTRUMENTABLE_ARRAY
 
Constructor Summary
FactoryComponentHandler()
           
 
Method Summary
protected  Object doGet()
          Get a reference of the desired Component
protected  void doPut(Object component)
          Return a reference of the desired Component
 
Methods inherited from class org.apache.avalon.fortress.impl.handler.AbstractComponentHandler
dispose, disposeComponent, doDispose, doPrepare, get, getComponentClass, initialize, newComponent, prepareHandler, put, service, toString
 
Methods inherited from class org.apache.excalibur.instrument.AbstractLogEnabledInstrumentable
addChildInstrumentable, addInstrument, getChildInstrumentables, getInstrumentableName, getInstruments, setInstrumentableName
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FactoryComponentHandler

public FactoryComponentHandler()
Method Detail

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 arros occurs

doPut

protected void doPut(Object component)
Return a reference of the desired Component

Overrides:
doPut in class AbstractComponentHandler
Parameters:
component - the compoent to return to the handler


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.