org.ow2.easybeans.api.components
Interface EZBComponentRegistry


public interface EZBComponentRegistry

This interface is the registry of the EasyBeans Components.

Author:
Florent Benoit

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

Method Detail

getComponent

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

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

getComponentName

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

getComponents

<T extends EZBComponent> List<T> getComponents(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(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(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.


Copyright © 2006-2012 OW2 Consortium. All Rights Reserved.