org.hippoecm.hst.core.container
Interface ComponentManager

All Known Implementing Classes:
ClientComponentManager, ComponentManagerFacade, SpringComponentManager

public interface ComponentManager

ComponentManager interface. This is responsible for initializing, starting, stopping and closing container components.

Version:
$Id: ComponentManager.java 32970 2012-02-15 20:36:52Z wko $

Method Summary
 void close()
          Closes the component manager and all the components.
<T> T
getComponent(String name)
          Returns the registered container component by name.
<T> T
getComponent(String name, String... addonModuleNames)
          Returns the registered component from a child context.
<T> Map<String,T>
getComponentsOfType(Class<T> requiredType)
          Returns the registered container components that match the given object type (including subclasses).
<T> Map<String,T>
getComponentsOfType(Class<T> requiredType, String... addonModuleNames)
          Returns the registered container component that match the given object type (including subclasses) from a child context.
 String[] getConfigurationResources()
          Returns configuration resources for components assembly
 ContainerConfiguration getContainerConfiguration()
          Returns the container configuration
 void initialize()
          Initializes the component manager and container components.
 void setConfigurationResources(String[] configurationResources)
          Sets configuration resources for components assembly
 void start()
          Starts the component manager to serve container components.
 void stop()
          Stop the component manager.
 

Method Detail

setConfigurationResources

void setConfigurationResources(String[] configurationResources)
Sets configuration resources for components assembly

Parameters:
configurationResources -

getConfigurationResources

String[] getConfigurationResources()
Returns configuration resources for components assembly

Parameters:
configurationResource -

initialize

void initialize()
Initializes the component manager and container components.


start

void start()
Starts the component manager to serve container components.


getComponent

<T> T getComponent(String name)
Returns the registered container component by name. Returns null if a component is not found by the specified name.

Type Parameters:
T - component type
Parameters:
name - the name of the component
Returns:
component

getComponentsOfType

<T> Map<String,T> getComponentsOfType(Class<T> requiredType)
Returns the registered container components that match the given object type (including subclasses). Returns empty map if a component is not found by the specified required type.

Type Parameters:
T - component type
Parameters:
requiredType - the required type of the component
Returns:
component map

getComponent

<T> T getComponent(String name,
                   String... addonModuleNames)
Returns the registered component from a child context. If addonModuleNames consists of multiple items, then each addonModuleNames item is regarded as child addon module name in the descendant hierarchy, as ordered. Returns null if a component is not found by the specified name.

Type Parameters:
T -
Parameters:
name -
contextNames -
Returns:
Throws:
ModuleNotFoundException - thrown when module is not found by the addonModuleNames

getComponentsOfType

<T> Map<String,T> getComponentsOfType(Class<T> requiredType,
                                      String... addonModuleNames)
Returns the registered container component that match the given object type (including subclasses) from a child context. Returns empty map if a component is not found from a child context by the specified required type. If addonModuleNames consists of multiple items, then each addonModuleNames item is regarded as child addon module name in the descendant hierarchy, as ordered. Returns empty map if a component is not found by the specified type.

Type Parameters:
T -
Parameters:
requiredType -
contextNames -
Returns:
component map
Throws:
ModuleNotFoundException - thrown when module is not found by the addonModuleNames

stop

void stop()
Stop the component manager.


close

void close()
Closes the component manager and all the components.


getContainerConfiguration

ContainerConfiguration getContainerConfiguration()
Returns the container configuration

Returns:


Copyright © 2008-2012 Hippo. All Rights Reserved.