|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | 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.
| Constructor Summary | |
DefaultComponentManager()
Construct ComponentManager with no parent. |
|
DefaultComponentManager(ComponentManager parent)
Construct ComponentManager with specified parent. |
|
| Method Summary | |
protected void |
checkWriteable()
|
protected java.util.Map |
getComponentMap()
Helper method for subclasses to retrieve component map. |
protected ComponentManager |
getParent()
Helper method for subclasses to retrieve parent. |
boolean |
hasComponent(java.lang.String role)
Check to see if a Component exists for a role. |
Component |
lookup(java.lang.String role)
Retrieve Component by role from ComponentManager. |
void |
makeReadOnly()
|
void |
put(java.lang.String role,
Component component)
Place Component into ComponentManager. |
void |
release(Component component)
Release component. |
java.lang.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(java.lang.String role)
throws ComponentException
lookup in interface ComponentManagerrole - the roleComponentException - if an error occurspublic boolean hasComponent(java.lang.String role)
ComponentManagerComponent exists for a role.hasComponent in interface ComponentManagerorg.apache.avalon.framework.component.ComponentManagerrole - a string identifying the role to check.
public void put(java.lang.String role,
Component component)
role - the components rolecomponent - the componentpublic void release(Component component)
release in interface ComponentManagercomponent - the componentpublic java.lang.String toString()
toString in class java.lang.Objectprotected final ComponentManager getParent()
protected final java.util.Map getComponentMap()
public void makeReadOnly()
protected final void checkWriteable()
throws java.lang.IllegalStateException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||