org.apache.avalon.fortress
Interface Container
- All Known Implementing Classes:
- AbstractContainer, TestContainer
- 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. Most applications will not, or barely, refer to implementations of this class; rather they will interact wit a ContainerManager implementation. All communication from the ContainerManager to the Container is through the Context object.
While plans exist to extend the Container interface to expose more of the Container's internals, we currently feel that we have insufficient use case information to determine the generic form of the container internals.
- Version:
- CVS $Revision: 1.10 $ $Date: 2004/02/28 15:16:24 $
- Author:
- See Also:
for the contract surrounding the Container context,
| Field Summary |
static java.lang.String |
ROLE
Work interface identifier. |
| Method Summary |
java.lang.Object |
get(java.lang.String key, java.lang.Object hint)
This is the method that the ContainerComponentManager and Selector use to gain access to the ComponentHandlers and ComponentSelectors. |
boolean |
has(java.lang.String key, java.lang.Object hint)
This is the method that the ContainerComponentManager and Selector use to gain access to the ComponentHandlers and ComponentSelectors. |
ROLE
public static final java.lang.String ROLE
-
Work interface identifier.
- Since:
- 1.1-dev
get
public java.lang.Object get(java.lang.String key,
java.lang.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(java.lang.String key,
java.lang.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.
Please see keelframework.org for information about new Keel releases.