public class DefaultComponentManager
extends java.lang.Object
Deprecated:
Use DefaultServiceManager instead.
| Modifier and Type | Field and Description |
|---|---|
private java.util.HashMap |
m_components |
private ComponentManager |
m_parent |
private boolean |
m_readOnly |
| Constructor and Description |
|---|
DefaultComponentManager()
Construct ComponentManager with no parent.
|
DefaultComponentManager(ComponentManager parent)
Construct ComponentManager with specified parent.
|
| Modifier and Type | Method and 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 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. |
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,
Component component)
Place Component into ComponentManager.
|
void |
release(Component component)
Release component.
|
java.lang.String |
toString()
Build a human readable representation of ComponentManager.
|
private final java.util.HashMap m_components
private final ComponentManager m_parent
private boolean m_readOnly
public DefaultComponentManager()
public DefaultComponentManager(ComponentManager parent)
parent - the ComponentManagers parentpublic Component lookup(java.lang.String key)
throws ComponentException
key - the keyComponentException - 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.key - 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,
Component component)
key - the components keycomponent - the componentpublic void release(Component component)
component - 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
java.lang.IllegalStateException - if this component m_manager is read-only