|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.apache.avalon.framework.component.DefaultComponentManager
This class is a static implementation of a ComponentManager. Allow ineritance and extension so you can generate a tree of ComponentManager each defining Component scope.
Deprecated:
Use DefaultServiceManager instead.
| 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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DefaultComponentManager()
public DefaultComponentManager(ComponentManager parent)
parent - the ComponentManagers parent| Method Detail |
public Component lookup(String key)
throws ComponentException
lookup in interface ComponentManagerkey - the key
ComponentException - if an error occurspublic boolean hasComponent(String key)
true if the component m_manager is managing a component
with the specified key, false otherwise.
hasComponent in interface ComponentManagerkey - key of the component you are lokking for
true if the component m_manager has a component with that key
public void put(String key,
Component component)
key - the components keycomponent - the componentpublic void release(Component component)
release in interface ComponentManagercomponent - the componentpublic String toString()
toString in class Objectprotected final ComponentManager getParent()
protected final Map getComponentMap()
public void makeReadOnly()
protected final void checkWriteable()
throws IllegalStateException
IllegalStateException - if this component m_manager is read-only
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||