|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.component.ComponentManager
public class ComponentManager
Create and destroy components.
Field Summary | |
---|---|
private static java.lang.String |
COMPONENT_STR
If Component classname ends with "Component", safely remove it. |
private java.util.List<java.lang.String> |
componentNames
Components names that are managed. |
private ComponentRegistry |
componentRegistry
Link to the registry of components (key=component name/value=EZB component). |
private Components |
components
Components objects. |
private JLog |
logger
Logger. |
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(EZBComponent component)
Add the given component. |
private void |
addComponent(java.lang.String componentName,
EZBComponent component)
Add a component. |
private java.lang.String |
getComponentName(EZBComponent component)
Gets the name for a given component. |
ComponentRegistry |
getComponentRegistry()
|
Components |
getComponents()
Gets the set of components. |
void |
initComponents()
Init the components by calling init() method. |
void |
removeComponent(EZBComponent 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 |
Field Detail |
---|
private static final java.lang.String COMPONENT_STR
private JLog logger
private java.util.List<java.lang.String> componentNames
private Components components
private ComponentRegistry componentRegistry
Constructor Detail |
---|
public ComponentManager()
public ComponentManager(Components components)
components
- the given set of componentsMethod Detail |
---|
public Components getComponents()
public void setComponents(Components components)
components
- the set of components.public void addComponent(EZBComponent component) throws EZBComponentException
component
- the component to register.
EZBComponentException
- if the component is not added.public void removeComponent(EZBComponent component) throws EZBComponentException
component
- the component to unregister.
EZBComponentException
- if the component is not removed.private java.lang.String getComponentName(EZBComponent component)
component
- the component instance.
private void addComponent(java.lang.String componentName, EZBComponent component) throws EZBComponentException
componentName
- the name of the component to addcomponent
- the component to add.
EZBComponentException
- if adds fails.public void initComponents() throws EZBComponentException
EZBComponentException
- if initialization failspublic void startComponents() throws EZBComponentException
EZBComponentException
- if starting is failingpublic void stopComponents()
public ComponentRegistry getComponentRegistry()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |