DefaultComponentSelector (Avalon Framework API)
Keywords: org.apache.avalon.framework.component.DefaultComponentSelector class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.avalon.framework.component
Class DefaultComponentSelector

    java.lang.Object
      org.apache.avalon.framework.component.DefaultComponentSelector

All Implemented Interfaces:
  Component, ComponentSelector

public class DefaultComponentSelector
extends java.lang.Object
implements ComponentSelector

This is the default implementation of the ComponentSelector.

Deprecated: Use `DefaultServiceSelector` instead.

Version:
  CVS $Revision: 1.23 $ $Date: 2004/02/11 14:34:25 $
Author:
  Avalon Development Team

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, Component component)` Populate the ComponentSelector.
`void` | `release(Component component)` Release 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`

Constructor Detail

### DefaultComponentSelector

    public DefaultComponentSelector()

Method Detail

### select

    public Component select(java.lang.Object hint)
                     throws ComponentException

  Select the desired component. It does not cascade, neither should it.

  Specified by:
    `select` in interface `ComponentSelector`
  Parameters:
    `hint` - the hint to retrieve Component
  Returns:
    the Component
  Throws:
    `ComponentException` - if an error occurs

### hasComponent

    public boolean hasComponent(java.lang.Object hint)

  Returns whether a Component exists or not

  Specified by:
    `hasComponent` in interface `ComponentSelector`
  Parameters:
    `hint` - the hint to retrieve Component
  Returns:
    `true` if the Component exists

### release

    public void release(Component component)

  Release component.

  Specified by:
    `release` in interface `ComponentSelector`
  Parameters:
    `component` - the component

### put

    public void put(java.lang.Object hint,
                    Component component)

  Populate the ComponentSelector.

  Parameters:
    `hint` - the hint to retrieve Component
    `component` - the component to add

### getComponentMap

    protected final java.util.Map getComponentMap()

  Helper method for subclasses to retrieve component map.

  Returns:
    the component map

### makeReadOnly

    public void makeReadOnly()

  Make this component selector read-only.

### checkWriteable

    protected final void checkWriteable()
                                 throws java.lang.IllegalStateException

  Check if this component m_manager is writeable.

  Throws:
    `java.lang.IllegalStateException` - if this component m_manager is read-only

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © The Apache Software Foundation. All Rights Reserved.