com.ibm.commerce.server
Class ComponentManager

java.lang.Object
  |
  +--com.ibm.commerce.server.ComponentManager

public class ComponentManager
extends java.lang.Object

The component manager is responsible for initialization of all components and for enabling and disabling components.


Field Summary
protected  java.util.Hashtable componentTable
           
 
Constructor Summary
ComponentManager()
          RegistryManager constructor comment.
 
Method Summary
 void deleteComponent(java.lang.String aComponentName)
          deletes a component given the name.
 void destroy()
          Refresh cache of registry information of all the registry entries in the hashtable.
 void destroyComponent(java.lang.String aComponent)
          destroys a component given the name.
 void disableComponent(java.lang.String aComponentName)
          Disables a component given the name.
 void enableComponent(java.lang.String aComponentName)
          Re-enable a component that has been disabled or a compoent that has never been enabled.
 ComponentConfiguration getComponent(java.lang.String aComponentName)
          Gets an instance of the component given the component name
 int getComponentHashcode(java.lang.String aComponentName)
          Gets the hashcode of a component.
 boolean getComponentStatus(java.lang.String aComponentName)
          Return the status of a component given the component name
 int getSize()
          Gets the size of table.
 void initComponent(ComponentDescriptor desc)
          Initalize a component given a component descriptor.
 void initComponent(org.w3c.dom.Element node)
          Initalize a component given a component node from the configuration file.
 void initComponent(java.lang.String aComponentName)
          Initalize a component given a component given name.
 void initialize()
          Initialize the component manager
 java.util.Enumeration list()
          List all the components maintained by the component manager.
static ComponentManager singleton()
          Gets an instance of the component given the component name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

componentTable

protected java.util.Hashtable componentTable
Constructor Detail

ComponentManager

public ComponentManager()
RegistryManager constructor comment.
Method Detail

deleteComponent

public void deleteComponent(java.lang.String aComponentName)
                     throws java.lang.Exception
deletes a component given the name.

Parameters:
name - String - name of component to be deleted

destroy

public void destroy()
Refresh cache of registry information of all the registry entries in the hashtable. Creation date: (5/18/00 5:20:17 PM)

destroyComponent

public void destroyComponent(java.lang.String aComponent)
destroys a component given the name. The destroy method of the component will be called.

Parameters:
name - String - name of component to be destroyed.

disableComponent

public void disableComponent(java.lang.String aComponentName)
                      throws java.lang.Exception
Disables a component given the name. The enabled method of the component will be called with a value of "false".

Parameters:
name - String - name of component to be disabled.

enableComponent

public void enableComponent(java.lang.String aComponentName)
                     throws java.lang.Exception
Re-enable a component that has been disabled or a compoent that has never been enabled. The enabled method of the component will be called with a value of true.

Parameters:
aComponentName - String - name of the component

getComponent

public ComponentConfiguration getComponent(java.lang.String aComponentName)
Gets an instance of the component given the component name

Parameters:
aComponentName - String name of the component.

getComponentHashcode

public int getComponentHashcode(java.lang.String aComponentName)
Gets the hashcode of a component.

Parameters:
aComponentName - String name of the component.
Returns:
int hashcode

getComponentStatus

public boolean getComponentStatus(java.lang.String aComponentName)
Return the status of a component given the component name

Parameters:
aComponentName - String name of the component.
Returns:
boolean - true for enabled false for disabled

getSize

public int getSize()
Gets the size of table.

Returns:
int number of component defined

initComponent

public void initComponent(ComponentDescriptor desc)
                   throws java.lang.Exception
Initalize a component given a component descriptor.

Throws:
java.lang.Exception -  

initComponent

public void initComponent(org.w3c.dom.Element node)
                   throws java.lang.Exception
Initalize a component given a component node from the configuration file.

Throws:
java.lang.Exception -  

initComponent

public void initComponent(java.lang.String aComponentName)
                   throws java.lang.Exception
Initalize a component given a component given name.

Throws:
java.lang.Exception -  

initialize

public void initialize()
                throws java.lang.Exception
Initialize the component manager
Throws:
java.lang.Exception -  

list

public java.util.Enumeration list()
List all the components maintained by the component manager.

singleton

public static ComponentManager singleton()
Gets an instance of the component given the component name

Parameters:
aComponentName - String name of the component.