|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.component.DefaultComponentSelector
This is the default implementation of the ComponentSelector.
Deprecated:
Use DefaultServiceSelector
instead.
Field Summary | |
private java.util.HashMap |
m_components
|
private boolean |
m_readOnly
|
Constructor Summary | |
DefaultComponentSelector()
|
Method Summary | |
protected void |
checkWriteable()
Check if this component m_manager is writeable. |
protected java.util.Map |
getComponentMap()
Helper method for subclasses to retrieve component map. |
boolean |
hasComponent(java.lang.Object hint)
Returns whether a Component exists or not |
void |
makeReadOnly()
Make this component selector read-only. |
void |
put(java.lang.Object hint,
org.apache.avalon.framework.component.Component component)
Populate the ComponentSelector. |
void |
release(org.apache.avalon.framework.component.Component component)
Release component. |
org.apache.avalon.framework.component.Component |
select(java.lang.Object hint)
Select the desired component. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final java.util.HashMap m_components
private boolean m_readOnly
Constructor Detail |
public DefaultComponentSelector()
Method Detail |
public org.apache.avalon.framework.component.Component select(java.lang.Object hint) throws org.apache.avalon.framework.component.ComponentException
select
in interface org.apache.avalon.framework.component.ComponentSelector
hint
- the hint to retrieve Component
ComponentException
- if an error occurspublic boolean hasComponent(java.lang.Object hint)
hasComponent
in interface org.apache.avalon.framework.component.ComponentSelector
hint
- the hint to retrieve Component
true
if the Component existspublic void release(org.apache.avalon.framework.component.Component component)
release
in interface org.apache.avalon.framework.component.ComponentSelector
component
- the componentpublic void put(java.lang.Object hint, org.apache.avalon.framework.component.Component component)
hint
- the hint to retrieve Componentcomponent
- the component to addprotected 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
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |