fr.paris5.shaman.insight.component
Class InsightManager
fr.paris5.shaman.insight.component.InsightManager
- All Implemented Interfaces:
- InsightConfigurationConstants, SystemConfigurationConstants
- Direct Known Subclasses:
- OperationCombinerTest.DummyInsightManager
- public class InsightManager
- implements SystemConfigurationConstants, InsightConfigurationConstants
Component Manager dedicated to Insight services. Allows different instantiation
approaches for having standalone / rmi server / rmi client objects defined from
the same configuration file. The reason to not use
ExcaliburComponentManager
is that it does not allow to configure
the factory instantiating Components.
- Version:
- $Id: InsightManager.java,v 1.2 2002/07/04 10:05:16 caillette Exp $
- Author:
- Laurent Caillette
Method Summary |
(package private) static void |
()
|
private void |
addHandler(org.apache.avalon.framework.configuration.Configuration configuration,
InsightContext.RunStyle runStyle)
|
private void |
addHandler(org.apache.avalon.framework.configuration.Configuration configuration,
InsightContext.RunStyle runStyle,
java.lang.String role)
|
private void |
addHandlerInstance(java.lang.String role,
ComponentHandler handler,
org.apache.avalon.framework.configuration.Configuration configuration)
|
void |
compose(org.apache.avalon.framework.component.ComponentManager parentCM)
|
void |
configure(org.apache.avalon.framework.configuration.Configuration bootstrapConfiguration)
Prepares ComponentHandler instances. |
void |
contextualize(org.apache.avalon.framework.context.Context context)
|
private void |
createInsightContext(org.apache.avalon.framework.configuration.Configuration bootstrapConf,
org.apache.avalon.framework.configuration.Configuration systemConf,
java.net.URL configurationURLInUse)
|
void |
dispose()
|
(package private) java.net.URL |
getConfigurationURL()
|
(package private) java.lang.String |
getHostName()
|
(package private) InsightContext.RunStyle |
getRunStyle()
|
boolean |
hasComponent(java.lang.String role)
|
void |
initialize()
Performs Avalon-defined initialization of components, in their
declaration order. |
org.apache.avalon.framework.component.Component |
lookup(java.lang.String role)
|
private void |
processConfiguration(org.apache.avalon.framework.configuration.Configuration systemConfiguration)
|
private org.apache.avalon.framework.configuration.Configuration |
readConfiguration(java.net.URL url)
|
void |
release(org.apache.avalon.framework.component.Component component)
|
void |
setLogKitManager(org.apache.avalon.excalibur.logger.LogKitManager logkitManager)
|
ROLE
public static final java.lang.String ROLE
classLoader
private java.lang.ClassLoader classLoader
inheritedContext
private org.apache.avalon.framework.context.Context inheritedContext
insightContext
private InsightContext insightContext
parentCM
private org.apache.avalon.framework.component.ComponentManager parentCM
handlersMap
private java.util.Hashtable handlersMap
- Table of instantiated ComponentHanders, by their Role name.
handlerList
private java.util.ArrayList handlerList
- List of ComponentHandlers ready to instantiate,
in their order of appearance in Configuration object.
componentHandlerClasses
private static java.util.Hashtable componentHandlerClasses
- Mapping between RunType and classes of context-aware Component
handler.
COMPONENTHANDLER_CONSTRUCTOR_ARGTYPES
private static final java.lang.Class[] COMPONENTHANDLER_CONSTRUCTOR_ARGTYPES
initialized
private boolean initialized
disposed
private boolean disposed
logKitManager
private org.apache.avalon.excalibur.logger.LogKitManager logKitManager
InsightManager
public InsightManager()
InsightManager
public InsightManager(java.lang.ClassLoader classLoader)
InsightManager
public InsightManager(org.apache.avalon.framework.component.ComponentManager parentCM,
java.lang.ClassLoader loader)
InsightManager
public InsightManager(org.apache.avalon.framework.component.ComponentManager parentCM)
compose
public void compose(org.apache.avalon.framework.component.ComponentManager parentCM)
throws org.apache.avalon.framework.component.ComponentException
lookup
public org.apache.avalon.framework.component.Component lookup(java.lang.String role)
throws org.apache.avalon.framework.component.ComponentException
hasComponent
public boolean hasComponent(java.lang.String role)
release
public void release(org.apache.avalon.framework.component.Component component)
contextualize
public void contextualize(org.apache.avalon.framework.context.Context context)
throws org.apache.avalon.framework.context.ContextException
getConfigurationURL
java.net.URL getConfigurationURL()
getHostName
java.lang.String getHostName()
getRunStyle
InsightContext.RunStyle getRunStyle()
static void ()
configure
public void configure(org.apache.avalon.framework.configuration.Configuration bootstrapConfiguration)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Prepares
ComponentHandler
instances.
- Parameters:
bootstrapConfiguration
- A System Configuration. SystemDirectory
and Insight services will be extracted from it.- Throws:
ConfigurationException
-
readConfiguration
private org.apache.avalon.framework.configuration.Configuration readConfiguration(java.net.URL url)
throws org.apache.avalon.framework.configuration.ConfigurationException
createInsightContext
private void createInsightContext(org.apache.avalon.framework.configuration.Configuration bootstrapConf,
org.apache.avalon.framework.configuration.Configuration systemConf,
java.net.URL configurationURLInUse)
throws org.apache.avalon.framework.configuration.ConfigurationException
processConfiguration
private void processConfiguration(org.apache.avalon.framework.configuration.Configuration systemConfiguration)
throws org.apache.avalon.framework.configuration.ConfigurationException
addHandler
private void addHandler(org.apache.avalon.framework.configuration.Configuration configuration,
InsightContext.RunStyle runStyle)
throws org.apache.avalon.framework.configuration.ConfigurationException
addHandler
private void addHandler(org.apache.avalon.framework.configuration.Configuration configuration,
InsightContext.RunStyle runStyle,
java.lang.String role)
throws org.apache.avalon.framework.configuration.ConfigurationException
addHandlerInstance
private void addHandlerInstance(java.lang.String role,
ComponentHandler handler,
org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
initialize
public void initialize()
throws java.lang.Exception
- Performs Avalon-defined initialization of components, in their
declaration order.
- Throws:
java.lang.Exception
-
dispose
public void dispose()
setLogKitManager
public void setLogKitManager(org.apache.avalon.excalibur.logger.LogKitManager logkitManager)
Copyright © 2002 Laurent Caillette and l'Université René Descartes, Paris 5. All rights reserved.