org.objectweb.easybeans.api.components
Interface EZBComponentRegistry

All Known Implementing Classes:
ComponentRegistry

public interface EZBComponentRegistry

This interface is the registry of the EasyBeans Components.

Author:
Florent Benoit

Method Summary
 EZBComponent getComponent(java.lang.String componentName)
          Allow to get a reference on another component.
 java.lang.String getComponentName(EZBComponent component)
           
<T extends EZBComponent>
java.util.List<T>
getComponents(java.lang.Class<T> itf)
          Get the components that implements the given interface.
 void register(java.lang.String componentName, EZBComponent component)
          Register a component.
 void unregister(EZBComponent component)
          Unregister a component.
 void unregister(java.lang.String componentName)
          Unregister a component.
 

Method Detail

getComponent

EZBComponent getComponent(java.lang.String componentName)
Allow to get a reference on another component.

Parameters:
componentName - the name of the component
Returns:
the component.

getComponentName

java.lang.String getComponentName(EZBComponent component)
Parameters:
component - EZBComponent instance.
Returns:
Returns the component name from the EZBComponent instance.

getComponents

<T extends EZBComponent> java.util.List<T> getComponents(java.lang.Class<T> itf)
Get the components that implements the given interface.

Type Parameters:
T - an interface extending EZBComponent.
Parameters:
itf - the given interface
Returns:
an array of components implementing the given interface

register

void register(java.lang.String componentName,
              EZBComponent component)
              throws EZBComponentException
Register a component.

Parameters:
componentName - the name of the component to register
component - the component to register.
Throws:
EZBComponentException - if registering fails.

unregister

void unregister(java.lang.String componentName)
                throws EZBComponentException
Unregister a component.

Parameters:
componentName - the component name to unregister.
Throws:
EZBComponentException - if unregistering fails.

unregister

void unregister(EZBComponent component)
                throws EZBComponentException
Unregister a component.

Parameters:
component - the instance of the component to unregister.
Throws:
EZBComponentException - if unregistering fails.