org.apache.avalon.framework.component
public class DefaultComponentSelector extends Object implements ComponentSelector
Deprecated: Use DefaultServiceSelector instead.
Version: $Id: DefaultComponentSelector.java 30977 2004-07-30 03:57:54 -0500 (Fri, 30 Jul 2004) niclas $
Field Summary | |
---|---|
HashMap | m_components |
boolean | m_readOnly |
Method Summary | |
---|---|
protected void | checkWriteable()
Check if this component m_manager is writeable.
|
protected Map | getComponentMap()
Helper method for subclasses to retrieve component map.
|
boolean | hasComponent(Object hint)
Returns whether a Component exists or not |
void | makeReadOnly()
Make this component selector read-only. |
void | put(Object hint, Component component)
Populate the ComponentSelector. |
void | release(Component component)
Release component.
|
Component | select(Object hint)
Select the desired component. |
Throws: IllegalStateException if this component m_manager is read-only
Returns: the component map
Parameters: hint the hint to retrieve Component
Returns: true
if the Component exists
Parameters: hint the hint to retrieve Component component the component to add
Parameters: component the component
Parameters: hint the hint to retrieve Component
Returns: the Component
Throws: ComponentException if an error occurs