org.sape.carbon.core.component
Interface ComponentKeeper

All Known Implementing Classes:
DefaultComponentKeeper

public interface ComponentKeeper

Interface for the system component keeper. A ComponentKeeper is responsible for the birth and death of all components and maintaining a reference to them during their lives.

Copyright 2002 Sapient

Since:
carbon 1.0
Version:
$Revision: 1.15 $($Author: dvoet $ / $Date: 2003/05/05 21:21:11 $)
Author:
Douglas Voet, January 2002

Method Summary
 void destroyAllComponents()
          Stops and destroys all components.
 void destroyComponent(String logicalComponentName)
          Destroys the component specified by the name parameter.
 Component fetchComponent(String logicalComponentName)
          Gets a reference to the component specified by the name parameter.
 Collection getComponentNames()
          Returns a Collection of all the components loaded in the system.
 

Method Detail

fetchComponent

public Component fetchComponent(String logicalComponentName)

Gets a reference to the component specified by the name parameter. Builds the component if it has not yet been created. Repeated calls to this method requesting the same logicalComponentName should return the same reference unless the component has been destroyed between calls.

Parameters:
logicalComponentName - the name of the component
Returns:
a reference to the component specified by name

getComponentNames

public Collection getComponentNames()
Returns a Collection of all the components loaded in the system. Implementations should return a defensive copy to avoid concurrency issues.

Returns:
Collection of component names (String)

destroyAllComponents

public void destroyAllComponents()

Stops and destroys all components.


destroyComponent

public void destroyComponent(String logicalComponentName)

Destroys the component specified by the name parameter.

Parameters:
logicalComponentName - the name of the component


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.