|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.geronimo.kernel.config.SimpleConfigurationManager
public class SimpleConfigurationManager
Field Summary | |
---|---|
protected ConfigurationModel |
configurationModel
|
protected Map |
configurations
|
protected static Log |
log
|
protected Collection |
repositories
|
protected Collection |
stores
|
protected Collection |
watchers
|
Constructor Summary | |
---|---|
SimpleConfigurationManager(Collection stores,
ArtifactResolver artifactResolver,
Collection repositories)
|
|
SimpleConfigurationManager(Collection stores,
ArtifactResolver artifactResolver,
Collection repositories,
Collection watchers)
|
Method Summary | |
---|---|
protected void |
addNewConfigurationToModel(Configuration configuration)
|
ArtifactResolver |
getArtifactResolver()
Gets the common ArtifactResolver in case the caller wants to use this directly. |
Configuration |
getConfiguration(Artifact configurationId)
Gets a loaded Configuration (does not see unloaded configurations). |
Artifact[] |
getInstalled(Artifact query)
Given an artifact that's not fully resolved (e.g. some parts are missing), check whether there are any instances installed into the server environment. |
Artifact[] |
getLoaded(Artifact query)
Given an artifact that's not fully resolved (e.g. some parts are missing), check whether there are any instances loaded. |
protected LinkedHashSet |
getLoadParents(Configuration configuration)
|
Collection |
getRepositories()
|
Artifact[] |
getRunning(Artifact query)
Given an artifact that's not fully resolved (e.g. some parts are missing), check whether there are any instances running. |
protected LinkedHashSet |
getStartParents(Configuration configuration)
|
ConfigurationStore |
getStoreForConfiguration(Artifact configId)
Gets the configuration store responsible for the specified configuration, or null if there is none. |
ConfigurationStore[] |
getStores()
Get all the ConfigurationStores known to this manager at present |
boolean |
isConfiguration(Artifact artifact)
Is the specified artifact a configuration? |
boolean |
isInstalled(Artifact configId)
Is the specified configuration installed into the server environment? |
boolean |
isLoaded(Artifact configId)
Is the specified configuration loaded into the kernel? |
boolean |
isOnline()
this configuration manager never starts configurations. |
boolean |
isRunning(Artifact configId)
Is the specified configuation running? |
List |
listConfigurations()
Gets a List>ConfigurationInfo< of every of every available configuation. |
List |
listConfigurations(AbstractName storeName)
Return a list of the configurations in a specific store. |
List |
listStores()
Return a list of the stores this manager knows about. |
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. |
LifecycleResults |
loadConfiguration(Artifact configurationId,
LifecycleMonitor monitor)
Load the specified configuration (from a config store) and all configurations it depends on into the kernel. |
LifecycleResults |
loadConfiguration(ConfigurationData configurationData)
Load the specified configurationData and all configurations it depends on (from a config store) into the kernel. |
LifecycleResults |
loadConfiguration(ConfigurationData configurationData,
LifecycleMonitor monitor)
Load the specified configurationData and all configurations it depends on (from a config store) into the kernel. |
protected void |
migrateConfiguration(Artifact oldName,
Artifact newName,
Configuration configuration,
boolean running)
|
LifecycleResults |
reloadConfiguration(Artifact id)
Reloads the specified configuration and all configurations that have a dependency on the specified configuration |
LifecycleResults |
reloadConfiguration(Artifact id,
LifecycleMonitor monitor)
Reloads the specified configuration and all configurations that have a dependency on the specified configuration |
LifecycleResults |
reloadConfiguration(Artifact id,
Version version)
Reloads the specified configuration and all configurations that have a dependency on the specified configuration |
LifecycleResults |
reloadConfiguration(Artifact id,
Version version,
LifecycleMonitor monitor)
Reloads the specified configuration and all configurations that have a dependency on the specified configuration |
LifecycleResults |
reloadConfiguration(ConfigurationData configurationData)
Reloads the specified configuration and all configurations that have a dependency on the specified configuration |
LifecycleResults |
reloadConfiguration(ConfigurationData configurationData,
LifecycleMonitor monitor)
Reloads the specified configuration and all configurations that have a dependency on the specified configuration |
protected void |
removeConfigurationFromModel(Artifact configurationId)
|
LifecycleResults |
restartConfiguration(Artifact id)
Restarts the specified configuration and all configurations that have a service dependency on the specified configuration |
LifecycleResults |
restartConfiguration(Artifact id,
LifecycleMonitor monitor)
Restarts the specified configuration and all configurations that have a service dependency on the specified configuration |
void |
setOnline(boolean online)
|
protected void |
start(Configuration configuration)
|
LifecycleResults |
startConfiguration(Artifact id)
Loads and starts all of the gbeans contained within the configuration. |
LifecycleResults |
startConfiguration(Artifact id,
LifecycleMonitor monitor)
Loads and starts all of the gbeans contained within the configuration. |
protected void |
stop(Configuration configuration)
|
LifecycleResults |
stopConfiguration(Artifact id)
Stop the gbeans contained within the configuration. |
LifecycleResults |
stopConfiguration(Artifact id,
LifecycleMonitor monitor)
Stop the gbeans contained within the configuration. |
void |
uninstallConfiguration(Artifact configurationId)
Unstalls the specified configuration from the server. |
protected void |
unload(Configuration configuration)
|
LifecycleResults |
unloadConfiguration(Artifact id)
Stops and unloads the configuration. |
LifecycleResults |
unloadConfiguration(Artifact id,
LifecycleMonitor monitor)
Stops and unloads the configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Log log
protected final Collection stores
protected final Map configurations
protected final ConfigurationModel configurationModel
protected final Collection repositories
protected final Collection watchers
Constructor Detail |
---|
public SimpleConfigurationManager(Collection stores, ArtifactResolver artifactResolver, Collection repositories)
public SimpleConfigurationManager(Collection stores, ArtifactResolver artifactResolver, Collection repositories, Collection watchers)
Method Detail |
---|
public boolean isInstalled(Artifact configId)
ConfigurationManager
isInstalled
in interface ConfigurationManager
configId
- the configuration identifier, which must be
fully resolved (isResolved() == true)
public boolean isLoaded(Artifact configId)
ConfigurationManager
isLoaded
in interface ConfigurationManager
configId
- the configuration identifier, which must be
fully resolved (isResolved() == true)
public boolean isRunning(Artifact configId)
ConfigurationManager
isRunning
in interface ConfigurationManager
configId
- the configuration identifier, which must be
fully resolved (isResolved() == true)
public Artifact[] getInstalled(Artifact query)
ConfigurationManager
getInstalled
in interface ConfigurationManager
query
- The partially-complete artifact name to check for
public Artifact[] getLoaded(Artifact query)
ConfigurationManager
getLoaded
in interface ConfigurationManager
query
- The partially-complete artifact name to check for
public Artifact[] getRunning(Artifact query)
ConfigurationManager
getRunning
in interface ConfigurationManager
query
- The partially-complete artifact name to check for
public List listStores()
ConfigurationManager
listStores
in interface ConfigurationManager
public ConfigurationStore[] getStores()
ConfigurationManager
getStores
in interface ConfigurationManager
public Collection getRepositories()
public List listConfigurations()
ConfigurationManager
listConfigurations
in interface ConfigurationManager
public ConfigurationStore getStoreForConfiguration(Artifact configId)
ConfigurationManager
getStoreForConfiguration
in interface ConfigurationManager
configId
- The unique ID for the configuration to check for,
which must be fully resolved (isResolved() == true)
public List listConfigurations(AbstractName storeName) throws NoSuchStoreException
ConfigurationManager
listConfigurations
in interface ConfigurationManager
storeName
- the store to list
NoSuchStoreException
- if the store could not be locatedpublic boolean isConfiguration(Artifact artifact)
ConfigurationManager
isConfiguration
in interface ConfigurationManager
artifact
- the ID of the artifact to check, which must be fully
resolved (isResolved() == true)
public Configuration getConfiguration(Artifact configurationId)
ConfigurationManager
getConfiguration
in interface ConfigurationManager
configurationId
- the unique ID of the configuration to get, which
must be fully resolved (isResolved() == true)
public LifecycleResults loadConfiguration(Artifact configurationId) throws NoSuchConfigException, LifecycleException
ConfigurationManager
loadConfiguration
in interface ConfigurationManager
configurationId
- the configuration identifier, which must be fully
resolved (isResolved() == true)
NoSuchConfigException
- if no configuration with the given id exists in the configuration stores
LifecycleException
- if there is a problem loading the configurationpublic LifecycleResults loadConfiguration(Artifact configurationId, LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
ConfigurationManager
loadConfiguration
in interface ConfigurationManager
configurationId
- the configuration identifier, which must be fully
resolved (isResolved() == true)monitor
- the monitor that should receive events as the operation is carried out
NoSuchConfigException
- if no configuration with the given id exists in the configuration stores
LifecycleException
- if there is a problem loading the configurationpublic LifecycleResults loadConfiguration(ConfigurationData configurationData) throws NoSuchConfigException, LifecycleException
ConfigurationManager
loadConfiguration
in interface ConfigurationManager
configurationData
- the configuration to load
NoSuchConfigException
- if no configuration with the given id exists in the configuration stores
LifecycleException
- if there is a problem loading the configurationpublic LifecycleResults loadConfiguration(ConfigurationData configurationData, LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
ConfigurationManager
loadConfiguration
in interface ConfigurationManager
configurationData
- the configuration to loadmonitor
- the monitor that should receive events as the operation is carried out
NoSuchConfigException
- if no configuration with the given id exists in the configuration stores
LifecycleException
- if there is a problem loading the configurationprotected void load(Artifact configurationId) throws NoSuchConfigException
NoSuchConfigException
protected Configuration load(ConfigurationData configurationData, LinkedHashSet resolvedParentIds, Map loadedConfigurations) throws InvalidConfigException
InvalidConfigException
protected void addNewConfigurationToModel(Configuration configuration) throws NoSuchConfigException
NoSuchConfigException
protected LinkedHashSet getLoadParents(Configuration configuration)
protected LinkedHashSet getStartParents(Configuration configuration)
public LifecycleResults startConfiguration(Artifact id) throws NoSuchConfigException, LifecycleException
ConfigurationManager
startConfiguration
in interface ConfigurationManager
id
- the configuration identifier, which must be fully
resolved (isResolved() == true)
NoSuchConfigException
- if the configuration is not loaded
LifecycleException
public LifecycleResults startConfiguration(Artifact id, LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
ConfigurationManager
startConfiguration
in interface ConfigurationManager
id
- the configuration identifier, which must be fully
resolved (isResolved() == true)monitor
- the monitor that should receive events as the operation is carried out
NoSuchConfigException
- if the configuration is not loaded
LifecycleException
protected void start(Configuration configuration) throws Exception
Exception
public LifecycleResults stopConfiguration(Artifact id) throws NoSuchConfigException
ConfigurationManager
stopConfiguration
in interface ConfigurationManager
id
- the configuration identifier, which must be fully
resolved (isResolved() == true)
NoSuchConfigException
- if the configuration is not loadedpublic LifecycleResults stopConfiguration(Artifact id, LifecycleMonitor monitor) throws NoSuchConfigException
ConfigurationManager
stopConfiguration
in interface ConfigurationManager
id
- the configuration identifier, which must be fully
resolved (isResolved() == true)monitor
- the monitor that should receive events as the operation is carried out
NoSuchConfigException
- if the configuration is not loadedprotected void stop(Configuration configuration)
public LifecycleResults restartConfiguration(Artifact id) throws NoSuchConfigException, LifecycleException
ConfigurationManager
restartConfiguration
in interface ConfigurationManager
id
- the configuration identifier, which must be fully
resolved (isResolved() == true)
NoSuchConfigException
- if the configuration is not loaded
LifecycleException
- if there is a problem loading the configurationpublic LifecycleResults restartConfiguration(Artifact id, LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
ConfigurationManager
restartConfiguration
in interface ConfigurationManager
id
- the configuration identifier, which must be fully
resolved (isResolved() == true)monitor
- the monitor that should receive events as the operation is carried out
NoSuchConfigException
- if the configuration is not loaded
LifecycleException
- if there is a problem loading the configurationpublic LifecycleResults unloadConfiguration(Artifact id) throws NoSuchConfigException
ConfigurationManager
unloadConfiguration
in interface ConfigurationManager
id
- the configuration identifier, which must be fully
resolved (isResolved() == true)
NoSuchConfigException
- if the configuration is not loadedpublic LifecycleResults unloadConfiguration(Artifact id, LifecycleMonitor monitor) throws NoSuchConfigException
ConfigurationManager
unloadConfiguration
in interface ConfigurationManager
id
- the configuration identifier, which must be fully
resolved (isResolved() == true)monitor
- the monitor that should receive events as the
operation is carried out
NoSuchConfigException
- if the configuration is not loadedprotected void removeConfigurationFromModel(Artifact configurationId) throws NoSuchConfigException
NoSuchConfigException
protected void unload(Configuration configuration)
public LifecycleResults reloadConfiguration(Artifact id) throws NoSuchConfigException, LifecycleException
ConfigurationManager
reloadConfiguration
in interface ConfigurationManager
id
- the configuration identifier, which must be fully
resolved (isResolved() == true)
NoSuchConfigException
- if the configuration is not loaded
LifecycleException
- if there is a problem loading the configurationpublic LifecycleResults reloadConfiguration(Artifact id, LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
ConfigurationManager
reloadConfiguration
in interface ConfigurationManager
id
- the configuration identifier, which must be fully
resolved (isResolved() == true)monitor
- the monitor that should receive events as the operation is carried out
NoSuchConfigException
- if the configuration is not loaded
LifecycleException
- if there is a problem loading the configurationpublic LifecycleResults reloadConfiguration(Artifact id, Version version) throws NoSuchConfigException, LifecycleException
ConfigurationManager
reloadConfiguration
in interface ConfigurationManager
id
- the configuration identifier, which must be fully
resolved (isResolved() == true)version
- new version to load from the config store
NoSuchConfigException
- if the configuration is not loaded
LifecycleException
- if there is a problem loading the configurationpublic LifecycleResults reloadConfiguration(Artifact id, Version version, LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
ConfigurationManager
reloadConfiguration
in interface ConfigurationManager
id
- the configuration identifier, which must be fully
resolved (isResolved() == true)version
- new version to load from the config storemonitor
- the monitor that should receive events as the operation is carried out
NoSuchConfigException
- if the configuration is not loaded
LifecycleException
- if there is a problem loading the configurationpublic LifecycleResults reloadConfiguration(ConfigurationData configurationData) throws LifecycleException, NoSuchConfigException
ConfigurationManager
reloadConfiguration
in interface ConfigurationManager
configurationData
- the configuration to load
LifecycleException
- if there is a problem loading the configuration
NoSuchConfigException
- if the configuration is not loadedpublic LifecycleResults reloadConfiguration(ConfigurationData configurationData, LifecycleMonitor monitor) throws LifecycleException, NoSuchConfigException
ConfigurationManager
reloadConfiguration
in interface ConfigurationManager
configurationData
- the configuration to loadmonitor
- the monitor that should receive events as the operation is carried out
LifecycleException
- if there is a problem loading the configuration
NoSuchConfigException
- if the configuration is not loadedprotected void migrateConfiguration(Artifact oldName, Artifact newName, Configuration configuration, boolean running) throws NoSuchConfigException
NoSuchConfigException
public void uninstallConfiguration(Artifact configurationId) throws IOException, NoSuchConfigException
ConfigurationManager
uninstallConfiguration
in interface ConfigurationManager
configurationId
- the configuration identifier, which must be fully
resolved (isResolved() == true)
IOException
- if there was a problem removing the configuration
NoSuchConfigException
- if the configuration is not loadedpublic ArtifactResolver getArtifactResolver()
ConfigurationManager
getArtifactResolver
in interface ConfigurationManager
public boolean isOnline()
isOnline
in interface ConfigurationManager
public void setOnline(boolean online)
setOnline
in interface ConfigurationManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |