org.apache.avalon.framework.component.ComponentManagerpublic class DefaultComponentManager
extends java.lang.Object
implements org.apache.avalon.framework.component.ComponentManager
Deprecated:
Use DefaultServiceManager instead.
| Modifier and Type | Field | Description |
|---|---|---|
private java.util.HashMap |
m_components |
|
private org.apache.avalon.framework.component.ComponentManager |
m_parent |
|
private boolean |
m_readOnly |
| Constructor | Description |
|---|---|
DefaultComponentManager() |
Construct ComponentManager with no parent.
|
DefaultComponentManager(org.apache.avalon.framework.component.ComponentManager parent) |
Construct ComponentManager with specified parent.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
checkWriteable() |
Check if this component m_manager is writeable.
|
protected java.util.Map |
getComponentMap() |
Helper method for subclasses to retrieve component map.
|
protected org.apache.avalon.framework.component.ComponentManager |
getParent() |
Helper method for subclasses to retrieve parent.
|
boolean |
hasComponent(java.lang.String key) |
Returns
true if the component m_manager is managing a component
with the specified key, false otherwise. |
org.apache.avalon.framework.component.Component |
lookup(java.lang.String key) |
Retrieve Component by key from ComponentManager.
|
void |
makeReadOnly() |
Make this component m_manager read only.
|
void |
put(java.lang.String key,
org.apache.avalon.framework.component.Component component) |
Place Component into ComponentManager.
|
void |
release(org.apache.avalon.framework.component.Component component) |
Release component.
|
java.lang.String |
toString() |
Build a human readable representation of ComponentManager.
|
private final java.util.HashMap m_components
private final org.apache.avalon.framework.component.ComponentManager m_parent
private boolean m_readOnly
public DefaultComponentManager()
public DefaultComponentManager(org.apache.avalon.framework.component.ComponentManager parent)
parent - the ComponentManagers parentpublic org.apache.avalon.framework.component.Component lookup(java.lang.String key)
throws org.apache.avalon.framework.component.ComponentException
lookup in interface org.apache.avalon.framework.component.ComponentManagerkey - the keyorg.apache.avalon.framework.component.ComponentException - if an error occurspublic boolean hasComponent(java.lang.String key)
true if the component m_manager is managing a component
with the specified key, false otherwise.hasComponent in interface org.apache.avalon.framework.component.ComponentManagerkey - key of the component you are lokking fortrue if the component m_manager has a component with that keypublic void put(java.lang.String key,
org.apache.avalon.framework.component.Component component)
key - the components keycomponent - the componentpublic void release(org.apache.avalon.framework.component.Component component)
release in interface org.apache.avalon.framework.component.ComponentManagercomponent - the componentpublic java.lang.String toString()
toString in class java.lang.Objectprotected final org.apache.avalon.framework.component.ComponentManager getParent()
protected final java.util.Map getComponentMap()
public void makeReadOnly()
protected final void checkWriteable()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if this component m_manager is read-only