org.ow2.util.component.api
Interface IComponentRegistry


public interface IComponentRegistry

This interface is the registry of the Components.

Author:
Florent Benoit

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

Method Detail

getComponent

Component 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(Component component)
Parameters:
component - EZBComponent instance.
Returns:
Returns the component name from the EZBComponent instance.

getComponents

<T extends Component> 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,
              Component component)
              throws ComponentException
Register a component.

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

unregister

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

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

unregister

void unregister(Component component)
                throws ComponentException
Unregister a component.

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


Copyright © 2007-2009 OW2 Consortium. All Rights Reserved.