|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConfigurationManager
Encapsulates logic for dealing with configurations. Configurations have a lifecycle with three states: installed, loaded, and running. Installed means that the configuration is present in the server's repository. Loaded means that the Configuration GBean (including the configuration's ClassLoader) is running. Running means that all the GBeans in the Configuration are running. From a user perspective, there's not much difference between installed and loaded if the configuration has not been started (it still shows up as not running). However, certain operations will cause a configuration to be loaded but not started. For example, if ModuleA depends on ModuleB, then when ModuleA is distributed ModuleB will normally be loaded (to fire up the ClassLoader and validate ModuleA). But ModuleB will not be started at that point. It can be started manually or it will be started automatically when ModuleA is started. When a Configuration is not loaded, only its ConfigurationData is available for inspection. It's normally not possible to inspect the GBeans in the configuration because there's no ClassLoader that could be used to load the classes needed by the GBeanDatas in the configuration. Once the configuration has been loaded, it's ClassLoader is available so the GBeanDatas can be loaded and inspected. But the GBean instances are not instantiated and started until the configuration is started.
Method Summary | |
---|---|
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. |
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. |
ConfigurationStore |
getStoreForConfiguration(Artifact configuration)
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 configurationId)
Is the specified configuration installed into the server environment? |
boolean |
isLoaded(Artifact configurationId)
Is the specified configuration loaded into the kernel? |
boolean |
isOnline()
Online means full functionality. |
boolean |
isRunning(Artifact configurationId)
Is the specified configuation running? |
List |
listConfigurations()
Gets a List>ConfigurationInfo< of every of every available configuation. |
List |
listConfigurations(AbstractName store)
Return a list of the configurations in a specific store. |
List |
listStores()
Return a list of the stores this manager knows about. |
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. |
LifecycleResults |
reloadConfiguration(Artifact configurationId)
Reloads the specified configuration and all configurations that have a dependency on the specified configuration |
LifecycleResults |
reloadConfiguration(Artifact configurationId,
LifecycleMonitor monitor)
Reloads the specified configuration and all configurations that have a dependency on the specified configuration |
LifecycleResults |
reloadConfiguration(Artifact configurationId,
Version version)
Reloads the specified configuration and all configurations that have a dependency on the specified configuration |
LifecycleResults |
reloadConfiguration(Artifact configurationId,
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 |
LifecycleResults |
restartConfiguration(Artifact configurationId)
Restarts the specified configuration and all configurations that have a service dependency on the specified configuration |
LifecycleResults |
restartConfiguration(Artifact configurationId,
LifecycleMonitor monitor)
Restarts the specified configuration and all configurations that have a service dependency on the specified configuration |
void |
setOnline(boolean online)
|
LifecycleResults |
startConfiguration(Artifact configurationId)
Loads and starts all of the gbeans contained within the configuration. |
LifecycleResults |
startConfiguration(Artifact configurationId,
LifecycleMonitor monitor)
Loads and starts all of the gbeans contained within the configuration. |
LifecycleResults |
stopConfiguration(Artifact configurationId)
Stop the gbeans contained within the configuration. |
LifecycleResults |
stopConfiguration(Artifact configurationId,
LifecycleMonitor monitor)
Stop the gbeans contained within the configuration. |
void |
uninstallConfiguration(Artifact configurationId)
Unstalls the specified configuration from the server. |
LifecycleResults |
unloadConfiguration(Artifact configurationId)
Stops and unloads the configuration. |
LifecycleResults |
unloadConfiguration(Artifact configurationId,
LifecycleMonitor monitor)
Stops and unloads the configuration. |
Method Detail |
---|
boolean isInstalled(Artifact configurationId)
configurationId
- the configuration identifier, which must be
fully resolved (isResolved() == true)
boolean isLoaded(Artifact configurationId)
configurationId
- the configuration identifier, which must be
fully resolved (isResolved() == true)
boolean isRunning(Artifact configurationId)
configurationId
- the configuration identifier, which must be
fully resolved (isResolved() == true)
Artifact[] getInstalled(Artifact query)
query
- The partially-complete artifact name to check for
Artifact[] getLoaded(Artifact query)
query
- The partially-complete artifact name to check for
Artifact[] getRunning(Artifact query)
query
- The partially-complete artifact name to check for
List listConfigurations()
List listStores()
ConfigurationStore[] getStores()
ConfigurationStore getStoreForConfiguration(Artifact configuration)
configuration
- The unique ID for the configuration to check for,
which must be fully resolved (isResolved() == true)
List listConfigurations(AbstractName store) throws NoSuchStoreException
store
- the store to list
NoSuchStoreException
- if the store could not be locatedboolean isConfiguration(Artifact artifact)
artifact
- the ID of the artifact to check, which must be fully
resolved (isResolved() == true)
Configuration getConfiguration(Artifact configurationId)
configurationId
- the unique ID of the configuration to get, which
must be fully resolved (isResolved() == true)
LifecycleResults loadConfiguration(Artifact configurationId) throws NoSuchConfigException, LifecycleException
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 configurationLifecycleResults loadConfiguration(ConfigurationData configurationData) throws NoSuchConfigException, LifecycleException
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 configurationLifecycleResults loadConfiguration(Artifact configurationId, LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
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 configurationLifecycleResults loadConfiguration(ConfigurationData configurationData, LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
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 configurationLifecycleResults unloadConfiguration(Artifact configurationId) throws NoSuchConfigException
configurationId
- the configuration identifier, which must be fully
resolved (isResolved() == true)
NoSuchConfigException
- if the configuration is not loadedLifecycleResults unloadConfiguration(Artifact configurationId, LifecycleMonitor monitor) throws NoSuchConfigException
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 the configuration is not loadedLifecycleResults startConfiguration(Artifact configurationId) throws NoSuchConfigException, LifecycleException
configurationId
- the configuration identifier, which must be fully
resolved (isResolved() == true)
NoSuchConfigException
- if the configuration is not loaded
LifecycleException
LifecycleResults startConfiguration(Artifact configurationId, LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
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 the configuration is not loaded
LifecycleException
LifecycleResults stopConfiguration(Artifact configurationId) throws NoSuchConfigException
configurationId
- the configuration identifier, which must be fully
resolved (isResolved() == true)
NoSuchConfigException
- if the configuration is not loadedLifecycleResults stopConfiguration(Artifact configurationId, LifecycleMonitor monitor) throws NoSuchConfigException
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 the configuration is not loadedLifecycleResults restartConfiguration(Artifact configurationId) throws NoSuchConfigException, LifecycleException
configurationId
- 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 configurationLifecycleResults restartConfiguration(Artifact configurationId, LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
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 the configuration is not loaded
LifecycleException
- if there is a problem loading the configurationLifecycleResults reloadConfiguration(Artifact configurationId) throws NoSuchConfigException, LifecycleException
configurationId
- 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 configurationLifecycleResults reloadConfiguration(Artifact configurationId, LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
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 the configuration is not loaded
LifecycleException
- if there is a problem loading the configurationLifecycleResults reloadConfiguration(Artifact configurationId, Version version) throws NoSuchConfigException, LifecycleException
configurationId
- 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 configurationLifecycleResults reloadConfiguration(Artifact configurationId, Version version, LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
configurationId
- the configuration identifier, which must be fully
resolved (isResolved() == true)monitor
- the monitor that should receive events as the operation is carried outversion
- new version to load from the config store
NoSuchConfigException
- if the configuration is not loaded
LifecycleException
- if there is a problem loading the configurationLifecycleResults reloadConfiguration(ConfigurationData configurationData) throws NoSuchConfigException, LifecycleException
configurationData
- the configuration to load
NoSuchConfigException
- if the configuration is not loaded
LifecycleException
- if there is a problem loading the configurationLifecycleResults reloadConfiguration(ConfigurationData configurationData, LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
configurationData
- the configuration to loadmonitor
- 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 configurationvoid uninstallConfiguration(Artifact configurationId) throws IOException, NoSuchConfigException
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 loadedArtifactResolver getArtifactResolver()
boolean isOnline()
void setOnline(boolean online)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |