|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.geronimo.system.configuration.LocalAttributeManager
public class LocalAttributeManager
Stores managed attributes in an XML file on the local filesystem.
| Field Summary | |
|---|---|
static GBeanInfo |
GBEAN_INFO
|
| Fields inherited from interface org.apache.geronimo.kernel.config.ManageableAttributeStore |
|---|
ATTRIBUTE_STORE |
| Fields inherited from interface org.apache.geronimo.kernel.config.PersistentConfigurationList |
|---|
PERSISTENT_CONFIGURATION_LIST |
| Constructor Summary | |
|---|---|
LocalAttributeManager(String configFile,
String configSubstitutionsFile,
String configSubstitutionsPrefix,
boolean readOnly,
ServerInfo serverInfo)
|
|
| Method Summary | |
|---|---|
void |
addConfiguration(Artifact configurationName)
Adds a configuration to the list, but does not mark it as started. |
void |
addGBean(Artifact configurationName,
GBeanData gbeanData,
ClassLoader classLoader)
Adds a GBean to the configuration. |
Collection |
applyOverrides(Artifact configName,
Collection untypedGbeanDatas,
ClassLoader classLoader)
Given a configuration name and a set of GBeanDatas, apply all the saved overrides to that set of GBeans before the caller attempts to load them. |
void |
doFail()
Fails the GBean. |
void |
doStart()
Starts the GBean. |
void |
doStop()
Stops the target. |
static GBeanInfo |
getGBeanInfo()
|
Artifact[] |
getListedConfigurations(Artifact query)
Gets all configurations in the list matching the specified query, whether they are marked at starting or not. |
boolean |
hasGBeanAttributes(Artifact configName)
This method checks if there are any custom gbean attributes in the configuration. |
boolean |
isKernelFullyStarted()
|
boolean |
isReadOnly()
|
void |
load()
|
void |
migrateConfiguration(Artifact oldName,
Artifact newName,
Configuration configuration)
Migrates settings from an old version of a configuration to a newer version of the configuration. |
void |
removeConfiguration(Artifact configName)
Removes all record of the specified configuration from the configuration list. |
List |
restore()
|
void |
save()
Saves the current values to persistent storage. |
void |
setKernelFullyStarted(boolean kernelFullyStarted)
|
void |
setModuleGBeans(Artifact moduleName,
GBeanOverride[] gbeans)
Adds a group of settings to the attribute store. |
void |
setReferencePatterns(Artifact configurationName,
AbstractName gbeanName,
GReferenceInfo reference,
ReferencePatterns patterns)
Sets the pattern for a GBean reference. |
void |
setShouldLoad(Artifact configurationName,
AbstractName gbeanName,
boolean load)
Sets whether a particular GBean should be loaded for this configuration. |
void |
setValue(Artifact configurationName,
AbstractName gbeanName,
GAttributeInfo attribute,
Object value,
ClassLoader classLoader)
Sets the stored value for a particular attribute. |
void |
startConfiguration(Artifact configurationName)
Indicates that the configuration should be started when the server is started. |
void |
stopConfiguration(Artifact configName)
Indicates that the configuration should not be started when the server is started. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final GBeanInfo GBEAN_INFO
| Constructor Detail |
|---|
public LocalAttributeManager(String configFile,
String configSubstitutionsFile,
String configSubstitutionsPrefix,
boolean readOnly,
ServerInfo serverInfo)
| Method Detail |
|---|
public boolean isReadOnly()
public Collection applyOverrides(Artifact configName,
Collection untypedGbeanDatas,
ClassLoader classLoader)
throws InvalidConfigException
ManageableAttributeStore
applyOverrides in interface ManageableAttributeStoreconfigName - The configuration in questionuntypedGbeanDatas - The initial GBeanData's for all the GBeans in
the configuration
InvalidConfigException - If something bad happens
public void setModuleGBeans(Artifact moduleName,
GBeanOverride[] gbeans)
PluginAttributeStore
setModuleGBeans in interface PluginAttributeStore
public void setValue(Artifact configurationName,
AbstractName gbeanName,
GAttributeInfo attribute,
Object value,
ClassLoader classLoader)
ManageableAttributeStore
setValue in interface ManageableAttributeStoreconfigurationName - The name of the configuration holding the GBean
in questiongbeanName - The ObjectName of the GBean in questionattribute - The attribute in questionvalue - The value to save, or null if no value should be savedclassLoader - The configuration's classLoader
public void setReferencePatterns(Artifact configurationName,
AbstractName gbeanName,
GReferenceInfo reference,
ReferencePatterns patterns)
ManageableAttributeStore
setReferencePatterns in interface ManageableAttributeStoreconfigurationName - the name of the configuration holding the GBean in questiongbeanName - the ObjectName of the GBeanreference - the attribute information
public void setShouldLoad(Artifact configurationName,
AbstractName gbeanName,
boolean load)
ManageableAttributeStore
setShouldLoad in interface ManageableAttributeStoreconfigurationName - The configuration that the GBean belongs togbeanName - The GBean in questionload - True if the GBean should load with the configuration
public void addGBean(Artifact configurationName,
GBeanData gbeanData,
ClassLoader classLoader)
ManageableAttributeStore
addGBean in interface ManageableAttributeStoreconfigurationName - the configuration that the GBean belongs togbeanData - the GBean to addclassLoader - The configuration classLoader
public void load()
throws IOException
IOException
public void save()
throws IOException
ManageableAttributeStore
save in interface ManageableAttributeStoresave in interface PersistentConfigurationListIOExceptionpublic boolean isKernelFullyStarted()
isKernelFullyStarted in interface PersistentConfigurationListpublic void setKernelFullyStarted(boolean kernelFullyStarted)
setKernelFullyStarted in interface PersistentConfigurationList
public List restore()
throws IOException
restore in interface PersistentConfigurationListIOExceptionpublic void startConfiguration(Artifact configurationName)
PersistentConfigurationList
startConfiguration in interface PersistentConfigurationListpublic void addConfiguration(Artifact configurationName)
PersistentConfigurationList
addConfiguration in interface PersistentConfigurationListpublic void removeConfiguration(Artifact configName)
PersistentConfigurationList
removeConfiguration in interface PersistentConfigurationListpublic Artifact[] getListedConfigurations(Artifact query)
PersistentConfigurationList
getListedConfigurations in interface PersistentConfigurationListquery - The artifact to search for, normally not fully resolved
so there may be multiple matches or matches that are not
exactly equal to the argument.
public void stopConfiguration(Artifact configName)
PersistentConfigurationList
stopConfiguration in interface PersistentConfigurationList
public void migrateConfiguration(Artifact oldName,
Artifact newName,
Configuration configuration)
PersistentConfigurationList
migrateConfiguration in interface PersistentConfigurationListoldName - The name that the existing settings are undernewName - The name to move the settings toconfiguration - The configuration itself, which can be used to
verify that all the settings are still valid as
they are migrated.public boolean hasGBeanAttributes(Artifact configName)
hasGBeanAttributes in interface PersistentConfigurationListconfigName - Name of the configuration
public void doStart()
throws Exception
GBeanLifecycle
doStart in interface GBeanLifecycleException - if the target failed to start; this will cause a transition to the failed state
public void doStop()
throws Exception
GBeanLifecycle
doStop in interface GBeanLifecycleException - if the target failed to stop; this will cause a transition to the failed statepublic void doFail()
GBeanLifecycle
doFail in interface GBeanLifecyclepublic static GBeanInfo getGBeanInfo()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||