org.apache.avalon.fortress
Interface Container

All Known Implementing Classes:
AbstractContainer

public interface Container

The Container is an interface used to mark the Containers in your system. It is used to functionally identify Containers. It's primary use is to assist Container developers to obtain the desired object from the Context. All communication from the ContainerManager to the Container is through the Context object.

Version:
CVS $Revision: 1.7 $ $Date: 2003/04/18 20:02:29 $
Author:
The Avalon Team
See Also:
for the contract surrounding the Container context, COP In Avalon

Method Summary
 Object get(String key, Object hint)
          This is the method that the ContainerComponentManager and Selector use to gain access to the ComponentHandlers and ComponentSelectors.
 boolean has(String key, Object hint)
          This is the method that the ContainerComponentManager and Selector use to gain access to the ComponentHandlers and ComponentSelectors.
 

Method Detail

get

public Object get(String key,
                  Object hint)
           throws ServiceException
This is the method that the ContainerComponentManager and Selector use to gain access to the ComponentHandlers and ComponentSelectors. The actual access of the ComponentHandler is delegated to the Container.

Parameters:
key - The role we intend to access a Component for.
hint - The hint that we use as a qualifier (note: if null, the default implementation is returned).
Returns:
Object a reference to the ComponentHandler or ComponentSelector for the role/hint combo.
Throws:
ServiceException - if the container cannot get the component

has

public boolean has(String key,
                   Object hint)
This is the method that the ContainerComponentManager and Selector use to gain access to the ComponentHandlers and ComponentSelectors. The actual access of the ComponentHandler is delegated to the Container.

Parameters:
key - The role we intend to access a Component for.
hint - The hint that we use as a qualifier (note: if null, the default implementation is returned).
Returns:
true if a reference to the role exists.


Copyright © 2000-2002 Apache Avalon Project. All Rights Reserved.