Interface ContainerConfigurationMBean
-
public interface ContainerConfigurationMBeanGeneric MBean for container configuration operations
The "default"
ContainerConfigurationMBeaninstance manages configuration state for the global environment. To manage configuration state for a specific namespace, use thegetContainerConfigurationMBean(String)method to get the ObjectName of an MBean instance that will do so.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONFIG_ITEM_MBEAN_TYPEstatic StringCONFIG_MBEAN_TYPEstatic StringNAMESPACE_KEYThe JMX Object Name property key that identifies the namespace that the Container Configuration MBean is managing state for.static StringOBJECT_NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]exportKey(String type, String key)Returns the configuration item identified by a particular keyObjectNamegetContainerConfigurationMBean(String namespace)Get the ObjectName of aContainerConfigurationMBeanthat can be used to manage the configuration items for a namespace.StringgetFileType(String type)Returns the default file type for a configuration typeStringgetKeyDescription(String type, String key)Returns a textual description of a configuration item identified by a particular keyString[]getKeys(String type)Returns the keys for all managed configuration items of the specified typeString[]getTypes()Returns the available configuration typesvoidimportKey(String type, boolean replace, byte[] data)Imports a set of configuration keys belonging to a single configuration typevoidremoveKey(String type, String key)Remove a configuration key
-
-
-
Field Detail
-
CONFIG_MBEAN_TYPE
static final String CONFIG_MBEAN_TYPE
- See Also:
- Constant Field Values
-
CONFIG_ITEM_MBEAN_TYPE
static final String CONFIG_ITEM_MBEAN_TYPE
- See Also:
- Constant Field Values
-
NAMESPACE_KEY
static final String NAMESPACE_KEY
The JMX Object Name property key that identifies the namespace that the Container Configuration MBean is managing state for. This key is equal to the string "namespace". This key is only present in the Object Name if the Container Configuration MBean is providing namespace-specific configuration rather than global configuration. The value of this key, if present, is the quoted name of the namespace.
- Since:
- Rhino 2.6.0
- See Also:
- Constant Field Values
-
OBJECT_NAME
static final String OBJECT_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getContainerConfigurationMBean
ObjectName getContainerConfigurationMBean(String namespace) throws UnrecognizedNamespaceException, ManagementException
Get the ObjectName of a
ContainerConfigurationMBeanthat can be used to manage the configuration items for a namespace.- Parameters:
namespace- the name of the namespace. Anullvalue or an empty string can be used to denote the default namespace.- Returns:
- The object name of a
ContainerConfigurationMBeanfor the specified namespace. - Throws:
UnrecognizedNamespaceException- ifnameis a non-zero-length string and is not a recognised user-defined namespace name.ConfigurationException- if a configuration error occurs.ManagementException- Since:
- Rhino 2.6.0
-
getKeys
String[] getKeys(String type) throws ManagementException, ConfigurationException
Returns the keys for all managed configuration items of the specified type
- Parameters:
type- a configuration type, must be one of the valid configuration types returned bygetTypes()- Throws:
ManagementExceptionConfigurationException
-
getTypes
String[] getTypes() throws ManagementException
Returns the available configuration types
- Throws:
ManagementException
-
exportKey
byte[] exportKey(String type, String key) throws ManagementException, ConfigurationException
Returns the configuration item identified by a particular key
The returned data is a serialized form of the configuration item
- Parameters:
type- a configuration type, must be one of the valid configuration types returned bygetTypes()key- unique key identifying the configuration item, seegetKeys(String)- Throws:
ManagementExceptionConfigurationException
-
getKeyDescription
String getKeyDescription(String type, String key) throws ManagementException, ConfigurationException
Returns a textual description of a configuration item identified by a particular key
The returned data is a serialized form of the configuration item
- Parameters:
type- a configuration type, must be one of the valid configuration types returned bygetTypes()key- unique key identifying the configuration item, seegetKeys(String)- Throws:
ManagementExceptionConfigurationException
-
importKey
void importKey(String type, boolean replace, byte[] data) throws ManagementException, ConfigurationException
Imports a set of configuration keys belonging to a single configuration type
- Parameters:
type- a configuration type, must be one of the valid configuration types returned bygetTypes()replace- if true any existing keys contained in the configuration data will be updateddata- serialized configuration data compatible with the serialized data returned byexportKey(java.lang.String, java.lang.String)- Throws:
ManagementExceptionConfigurationException
-
removeKey
void removeKey(String type, String key) throws ManagementException, ConfigurationException
Remove a configuration key
- Parameters:
type-key-- Throws:
ManagementExceptionConfigurationException
-
getFileType
String getFileType(String type) throws ConfigurationException
Returns the default file type for a configuration type
The return value will usually be either "xml" or "license" and is used by the exporter to create local files containing the content of some exported config item.
- Parameters:
type-- Throws:
ConfigurationException- if the configuration type is unknown
-
-