org.apache.avalon.fortress.impl.handler
Interface ComponentHandler

All Known Implementing Classes:
AbstractComponentHandler, LEAwareComponentHandler

public interface ComponentHandler

The ComponentHandler interface marks the ComponentHandler implementations. The desire for a ComponentHandler is to manage the instances of a Component.

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

Method Summary
 java.lang.Object get()
          Gets the current reference to a Component according to the policy of the implementation.
 java.lang.Class getComponentClass()
          Return the component's class that this handler is trying to create.
 void prepareHandler()
          Actually prepare the handler and make it ready to handle component access.
 void put(java.lang.Object component)
          Puts the reference back in the ComponentHandler according to the policy of the implementation.
 

Method Detail

getComponentClass

public java.lang.Class getComponentClass()
Return the component's class that this handler is trying to create. Used for deubug information.

Returns:
the Class object for the component

prepareHandler

public void prepareHandler()
                    throws java.lang.Exception
Actually prepare the handler and make it ready to handle component access.

Throws:
java.lang.Exception - if unable to prepare handler

get

public java.lang.Object get()
                     throws java.lang.Exception
Gets the current reference to a Component according to the policy of the implementation.

Throws:
java.lang.Exception - if unable to ge tthe compoennt reference

put

public void put(java.lang.Object component)
Puts the reference back in the ComponentHandler according to the policy of the implementation.

Parameters:
component - the component to return to the handler


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.