org.apache.geronimo.kernel.config
Class KernelConfigurationManager

java.lang.Object
  extended by org.apache.geronimo.kernel.config.SimpleConfigurationManager
      extended by org.apache.geronimo.kernel.config.KernelConfigurationManager
All Implemented Interfaces:
GBeanLifecycle, ConfigurationManager
Direct Known Subclasses:
EditableKernelConfigurationManager

public class KernelConfigurationManager
extends SimpleConfigurationManager
implements GBeanLifecycle

The standard non-editable ConfigurationManager implementation. That is, you can save a lost configurations and stuff, but not change the set of GBeans included in a configuration.

See Also:
EditableConfigurationManager

Field Summary
protected  ManageableAttributeStore attributeStore
           
protected  ClassLoader classLoader
           
protected  PersistentConfigurationList configurationList
           
static GBeanInfo GBEAN_INFO
           
protected  Kernel kernel
           
 
Fields inherited from class org.apache.geronimo.kernel.config.SimpleConfigurationManager
configurationModel, configurations, log, repositories, stores, watchers
 
Constructor Summary
KernelConfigurationManager(Kernel kernel, Collection stores, ManageableAttributeStore attributeStore, PersistentConfigurationList configurationList, ArtifactManager artifactManager, ArtifactResolver artifactResolver, Collection repositories, Collection watchers, ClassLoader classLoader)
           
 
Method Summary
 void doFail()
          Fails the GBean.
 void doStart()
          Starts the GBean.
 void doStop()
          Stops the target.
static GBeanInfo getGBeanInfo()
           
 boolean isOnline()
          this configuration manager never starts configurations.
protected  void load(Artifact configurationId)
           
protected  Configuration load(ConfigurationData configurationData, LinkedHashSet resolvedParentIds, Map loadedConfigurations)
           
 LifecycleResults loadConfiguration(Artifact configurationId)
          Load the specified configuration (from a config store) and all configurations it depends on into the kernel.
protected  void migrateConfiguration(Artifact oldName, Artifact newName, Configuration configuration, boolean running)
           
 void setOnline(boolean online)
           
 void start(Configuration configuration)
           
protected  void stop(Configuration configuration)
           
protected  void unload(Configuration configuration)
           
 
Methods inherited from class org.apache.geronimo.kernel.config.SimpleConfigurationManager
addNewConfigurationToModel, getArtifactResolver, getConfiguration, getInstalled, getLoaded, getLoadParents, getRepositories, getRunning, getStartParents, getStoreForConfiguration, getStores, isConfiguration, isInstalled, isLoaded, isRunning, listConfigurations, listConfigurations, listStores, loadConfiguration, loadConfiguration, loadConfiguration, reloadConfiguration, reloadConfiguration, reloadConfiguration, reloadConfiguration, reloadConfiguration, reloadConfiguration, removeConfigurationFromModel, restartConfiguration, restartConfiguration, startConfiguration, startConfiguration, stopConfiguration, stopConfiguration, uninstallConfiguration, unloadConfiguration, unloadConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

kernel

protected final Kernel kernel

attributeStore

protected final ManageableAttributeStore attributeStore

configurationList

protected final PersistentConfigurationList configurationList

classLoader

protected final ClassLoader classLoader

GBEAN_INFO

public static final GBeanInfo GBEAN_INFO
Constructor Detail

KernelConfigurationManager

public KernelConfigurationManager(Kernel kernel,
                                  Collection stores,
                                  ManageableAttributeStore attributeStore,
                                  PersistentConfigurationList configurationList,
                                  ArtifactManager artifactManager,
                                  ArtifactResolver artifactResolver,
                                  Collection repositories,
                                  Collection watchers,
                                  ClassLoader classLoader)
Method Detail

loadConfiguration

public LifecycleResults loadConfiguration(Artifact configurationId)
                                   throws NoSuchConfigException,
                                          LifecycleException
Description copied from interface: ConfigurationManager
Load the specified configuration (from a config store) and all configurations it depends on into the kernel. This causes the configuration gbean to be loaded and started, but does not load any of the gbeans contained within the configuration.

Specified by:
loadConfiguration in interface ConfigurationManager
Overrides:
loadConfiguration in class SimpleConfigurationManager
Parameters:
configurationId - the configuration identifier, which must be fully resolved (isResolved() == true)
Returns:
the results of the operation
Throws:
NoSuchConfigException - if no configuration with the given id exists in the configuration stores
LifecycleException - if there is a problem loading the configuration

load

protected void load(Artifact configurationId)
             throws NoSuchConfigException
Overrides:
load in class SimpleConfigurationManager
Throws:
NoSuchConfigException

migrateConfiguration

protected void migrateConfiguration(Artifact oldName,
                                    Artifact newName,
                                    Configuration configuration,
                                    boolean running)
                             throws NoSuchConfigException
Overrides:
migrateConfiguration in class SimpleConfigurationManager
Throws:
NoSuchConfigException

load

protected Configuration load(ConfigurationData configurationData,
                             LinkedHashSet resolvedParentIds,
                             Map loadedConfigurations)
                      throws InvalidConfigException
Overrides:
load in class SimpleConfigurationManager
Throws:
InvalidConfigException

start

public void start(Configuration configuration)
           throws InvalidConfigException
Overrides:
start in class SimpleConfigurationManager
Throws:
InvalidConfigException

isOnline

public boolean isOnline()
Description copied from class: SimpleConfigurationManager
this configuration manager never starts configurations.

Specified by:
isOnline in interface ConfigurationManager
Overrides:
isOnline in class SimpleConfigurationManager
Returns:
false

setOnline

public void setOnline(boolean online)
Specified by:
setOnline in interface ConfigurationManager
Overrides:
setOnline in class SimpleConfigurationManager

stop

protected void stop(Configuration configuration)
Overrides:
stop in class SimpleConfigurationManager

unload

protected void unload(Configuration configuration)
Overrides:
unload in class SimpleConfigurationManager

doStart

public void doStart()
Description copied from interface: GBeanLifecycle
Starts the GBean. This informs the GBean that it is about to transition to the running state.

Specified by:
doStart in interface GBeanLifecycle

doStop

public void doStop()
Description copied from interface: GBeanLifecycle
Stops the target. This informs the GBean that it is about to transition to the stopped state.

Specified by:
doStop in interface GBeanLifecycle

doFail

public void doFail()
Description copied from interface: GBeanLifecycle
Fails the GBean. This informs the GBean that it is about to transition to the failed state.

Specified by:
doFail in interface GBeanLifecycle

getGBeanInfo

public static GBeanInfo getGBeanInfo()


Copyright © 2006 Apache Software Foundation. All Rights Reserved.