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, ConfigurationSource
Direct Known Subclasses:
EditableKernelConfigurationManager

@GBean(j2eeType="ConfigurationManager")
@OsgiService
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.

Version:
$Rev:386276 $ $Date: 2011-12-14 02:00:08 +0800 (Wed, 14 Dec 2011) $

Field Summary
protected  ManageableAttributeStore attributeStore
           
protected  PersistentConfigurationList configurationList
           
protected  Kernel kernel
           
 
Fields inherited from class org.apache.geronimo.kernel.config.SimpleConfigurationManager
bundleContext, bundles, configurationModel, configurations, log, repositories, stores, watchers
 
Constructor Summary
KernelConfigurationManager(Kernel kernel, Collection<ConfigurationStore> stores, ManageableAttributeStore attributeStore, PersistentConfigurationList configurationList, ArtifactManager artifactManager, ArtifactResolver artifactResolver, Collection<ListableRepository> repositories, Collection<DeploymentWatcher> watchers, org.osgi.framework.BundleContext bundleContext)
           
 
Method Summary
 void doFail()
          Fails the GBean.
 void doStart()
          Starts the GBean.
 void doStop()
          Stops the target.
 boolean isOnline()
          this configuration manager never starts configurations.
protected  void load(Artifact configurationId)
           
protected  Configuration load(ConfigurationData configurationData, LinkedHashSet<Artifact> resolvedParentIds, Map<Artifact,Configuration> 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 uninstall(Artifact configurationId)
           
protected  void unload(Configuration configuration)
           
 
Methods inherited from class org.apache.geronimo.kernel.config.SimpleConfigurationManager
addNewConfigurationToModel, attemptGetBundleByLocation, buildAllServiceParents, buildDependencyNode, doLoad, getArtifactResolver, getBundle, getConfiguration, getConfigurationModel, getInstalled, getLoaded, getLoadParents, getRepositories, getRunning, getStartParents, getStoreForConfiguration, getStoreList, getStores, isConfiguration, isInstalled, isLoaded, isRunning, listConfigurations, listConfigurations, listStores, loadConfiguration, loadConfiguration, loadConfiguration, newConfigurationResolver, reloadConfiguration, reloadConfiguration, reloadConfiguration, reloadConfiguration, reloadConfiguration, reloadConfiguration, removeConfigurationFromModel, resolveParentIds, restartConfiguration, restartConfiguration, sort, 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
Constructor Detail

KernelConfigurationManager

public KernelConfigurationManager(@ParamSpecial(type=kernel)
                                  Kernel kernel,
                                  @ParamReference(name="Stores",namingType="ConfigurationStore")
                                  Collection<ConfigurationStore> stores,
                                  @ParamReference(name="AttributeStore",namingType="AttributeStore")
                                  ManageableAttributeStore attributeStore,
                                  @ParamReference(name="PersistentConfigurationList")
                                  PersistentConfigurationList configurationList,
                                  @ParamReference(name="ArtifactManager",namingType="ArtifactManager")
                                  ArtifactManager artifactManager,
                                  @ParamReference(name="ArtifactResolver",namingType="ArtifactResolver")
                                  ArtifactResolver artifactResolver,
                                  @ParamReference(name="Repositories",namingType="Repository")
                                  Collection<ListableRepository> repositories,
                                  @ParamReference(name="Watchers")
                                  Collection<DeploymentWatcher> watchers,
                                  @ParamSpecial(type=bundleContext)
                                  org.osgi.framework.BundleContext bundleContext)
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<Artifact> resolvedParentIds,
                             Map<Artifact,Configuration> 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

uninstall

protected void uninstall(Artifact configurationId)
Overrides:
uninstall 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


Copyright © 2003-2013 The Apache Geronimo development community. All Rights Reserved.