Interface ContainerConfigurationMBean
-
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 thegetContainerConfigurationMBean(String)
method to get the ObjectName of an MBean instance that will do so.
-
-
Field Summary
Fields Modifier and Type Field 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
-
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 keyObjectName
getContainerConfigurationMBean(String namespace)
Get the ObjectName of aContainerConfigurationMBean
that can be used to manage the configuration items for a namespace.String
getFileType(String type)
Returns the default file type for a configuration typeString
getKeyDescription(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 typesvoid
importKey(String type, boolean replace, byte[] data)
Imports a set of configuration keys belonging to a single configuration typevoid
removeKey(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
ContainerConfigurationMBean
that can be used to manage the configuration items for a namespace.- Parameters:
namespace
- the name of the namespace. Anull
value or an empty string can be used to denote the default namespace.- Returns:
- The object name of a
ContainerConfigurationMBean
for the specified namespace. - Throws:
UnrecognizedNamespaceException
- ifname
is 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:
ManagementException
ConfigurationException
-
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:
ManagementException
ConfigurationException
-
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:
ManagementException
ConfigurationException
-
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:
ManagementException
ConfigurationException
-
removeKey
void removeKey(String type, String key) throws ManagementException, ConfigurationException
Remove a configuration key
- Parameters:
type
-key
-- Throws:
ManagementException
ConfigurationException
-
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
-
-