public interface ContainerConfigurationMBean
Generic MBean for container configuration operations
The "default" ContainerConfigurationMBean
instance manages configuration state for the global environment.
To manage configuration state for a specific namespace, use the getContainerConfigurationMBean(String)
method to get the ObjectName of an MBean instance that will do so.
Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_ITEM_MBEAN_TYPE |
static String |
CONFIG_MBEAN_TYPE |
static String |
NAMESPACE_KEY
The JMX Object Name property key that identifies the namespace that the Container Configuration MBean is managing state for.
|
static String |
OBJECT_NAME |
Modifier and Type | Method and Description |
---|---|
byte[] |
exportKey(String type,
String key)
Returns the configuration item identified by a particular key
The returned data is a serialized form of the configuration item
|
ObjectName |
getContainerConfigurationMBean(String namespace)
Get the ObjectName of a
ContainerConfigurationMBean that can be used to manage the configuration items for a namespace. |
String |
getFileType(String type)
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.
|
String |
getKeyDescription(String type,
String key)
Returns a textual description of a configuration item identified by a particular key
The returned data is a serialized form of the configuration item
|
String[] |
getKeys(String type)
Returns the keys for all managed configuration items of the specified type
|
String[] |
getTypes()
Returns the available configuration types
|
void |
importKey(String type,
boolean replace,
byte[] data)
Imports a set of configuration keys belonging to a single configuration type
|
void |
removeKey(String type,
String key)
Remove a configuration key
|
static final String CONFIG_MBEAN_TYPE
static final String CONFIG_ITEM_MBEAN_TYPE
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.
static final String OBJECT_NAME
ObjectName getContainerConfigurationMBean(String namespace) throws UnrecognizedNamespaceException, ManagementException
Get the ObjectName of a ContainerConfigurationMBean
that can be used to manage the configuration items for a namespace.
namespace
- the name of the namespace.
A null
value or an empty string can be used to denote the default namespace.ContainerConfigurationMBean
for the specified namespace.UnrecognizedNamespaceException
- if name
is a non-zero-length string and is not a recognised user-defined namespace name.ConfigurationException
- if a configuration error occurs.ManagementException
String[] getKeys(String type) throws ManagementException, ConfigurationException
Returns the keys for all managed configuration items of the specified type
type
- a configuration type, must be one of the valid configuration types returned by getTypes()
ManagementException
ConfigurationException
String[] getTypes() throws ManagementException
Returns the available configuration types
ManagementException
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
type
- a configuration type, must be one of the valid configuration types returned by getTypes()
key
- unique key identifying the configuration item, see getKeys(String)
ManagementException
ConfigurationException
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
type
- a configuration type, must be one of the valid configuration types returned by getTypes()
key
- unique key identifying the configuration item, see getKeys(String)
ManagementException
ConfigurationException
void importKey(String type, boolean replace, byte[] data) throws ManagementException, ConfigurationException
Imports a set of configuration keys belonging to a single configuration type
type
- a configuration type, must be one of the valid configuration types returned by getTypes()
replace
- if true any existing keys contained in the configuration data will be updateddata
- serialized configuration data compatible with the serialized data returned by exportKey(java.lang.String, java.lang.String)
ManagementException
ConfigurationException
void removeKey(String type, String key) throws ManagementException, ConfigurationException
Remove a configuration key
type
- key
- ManagementException
ConfigurationException
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.
type
- ConfigurationException
- if the configuration type is unknown