org.apache.avalon.framework.component
public class DefaultComponentManager extends Object implements ComponentManager
Deprecated: Use DefaultServiceManager instead.
Version: $Id: DefaultComponentManager.java 30977 2004-07-30 03:57:54 -0500 (Fri, 30 Jul 2004) niclas $
Field Summary | |
---|---|
HashMap | m_components |
ComponentManager | m_parent |
boolean | m_readOnly |
Constructor Summary | |
---|---|
DefaultComponentManager()
Construct ComponentManager with no parent.
| |
DefaultComponentManager(ComponentManager parent)
Construct ComponentManager with specified parent.
|
Method Summary | |
---|---|
protected void | checkWriteable()
Check if this component m_manager is writeable.
|
protected Map | getComponentMap()
Helper method for subclasses to retrieve component map.
|
protected ComponentManager | getParent()
Helper method for subclasses to retrieve parent.
|
boolean | hasComponent(String key)
Returns true if the component m_manager is managing a component
with the specified key, false otherwise.
|
Component | lookup(String key)
Retrieve Component by key from ComponentManager.
|
void | makeReadOnly()
Make this component m_manager read only. |
void | put(String key, Component component)
Place Component into ComponentManager.
|
void | release(Component component)
Release component.
|
String | toString()
Build a human readable representation of ComponentManager.
|
Parameters: parent the ComponentManagers parent
Throws: IllegalStateException if this component m_manager is read-only
Returns: the component map
Returns: the parent ComponentManager
true
if the component m_manager is managing a component
with the specified key, false
otherwise.
Parameters: key key of the component you are lokking for
Returns: true
if the component m_manager has a component with that key
Parameters: key the key
Returns: the Component
Throws: ComponentException if an error occurs
Parameters: key the components key component the component
Parameters: component the component
Returns: the description of ComponentManager