org.ow2.util.component
Class ComponentManager

java.lang.Object
  extended by org.ow2.util.component.ComponentManager
All Implemented Interfaces:
org.ow2.util.component.api.IComponentManager

public class ComponentManager
extends Object
implements org.ow2.util.component.api.IComponentManager

Create and destroy components.

Author:
Florent Benoit

Constructor Summary
ComponentManager()
          Build a component manager.
ComponentManager(Components components)
          Build a new component manager with the given set of components.
 
Method Summary
 void addComponent(org.ow2.util.component.api.Component component)
          Add the given component.
 org.ow2.util.component.api.IComponentRegistry getComponentRegistry()
           
 Components getComponents()
          Gets the set of components.
 void initComponents()
          Init the components by calling init() method.
 void removeComponent(org.ow2.util.component.api.Component component)
          Remove the given component.
 void setComponents(Components components)
          Sets the components object.
 void startComponents()
          Start the components.
 void stopComponents()
          Stop the components.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentManager

public ComponentManager()
Build a component manager.


ComponentManager

public ComponentManager(Components components)
Build a new component manager with the given set of components.

Parameters:
components - the given set of components
Method Detail

getComponents

public Components getComponents()
Gets the set of components.

Returns:
the set of components.

setComponents

public void setComponents(Components components)
Sets the components object.

Parameters:
components - the set of components.

addComponent

public void addComponent(org.ow2.util.component.api.Component component)
                  throws org.ow2.util.component.api.ComponentException
Add the given component.

Parameters:
component - the component to register.
Throws:
org.ow2.util.component.api.ComponentException - if the component is not added.

removeComponent

public void removeComponent(org.ow2.util.component.api.Component component)
                     throws org.ow2.util.component.api.ComponentException
Remove the given component.

Parameters:
component - the component to unregister.
Throws:
org.ow2.util.component.api.ComponentException - if the component is not removed.

initComponents

public void initComponents()
                    throws org.ow2.util.component.api.ComponentException
Init the components by calling init() method.

Specified by:
initComponents in interface org.ow2.util.component.api.IComponentManager
Throws:
org.ow2.util.component.api.ComponentException - if initialization fails

startComponents

public void startComponents()
                     throws org.ow2.util.component.api.ComponentException
Start the components.

Specified by:
startComponents in interface org.ow2.util.component.api.IComponentManager
Throws:
org.ow2.util.component.api.ComponentException - if starting is failing

stopComponents

public void stopComponents()
Stop the components.

Specified by:
stopComponents in interface org.ow2.util.component.api.IComponentManager

getComponentRegistry

public org.ow2.util.component.api.IComponentRegistry getComponentRegistry()
Specified by:
getComponentRegistry in interface org.ow2.util.component.api.IComponentManager
Returns:
the component registry used by this manager.


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