com.ibm.websphere.management.configservice
Class ConfigServiceHelper
- java.lang.Object
com.ibm.websphere.management.configservice.ConfigServiceHelper
- public class ConfigServiceHelper
- extends java.lang.Object
ObjectName
, ConfigDataId
, and manipulate generic
AttributeList
data structure.
Constructor Summary
Constructor and Description |
---|
ConfigServiceHelper()
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
checkIfNameValid(java.lang.String aName)
Check if the specified name is a valid object name.
|
|
convertObjectNameToConfigDataId(javax.management.ObjectName on)
Converts an
ObjectName of dynamic MBean to the id of its corresponding Config data.
|
|
createObjectName(javax.management.AttributeList attrList)
Create an object name from the specified attribute list, the returned
ObjectName can be
used to identify the config data represented by the specified attribute list, then be used in subsequent calls to
ConfigService to further query or modify this config data.
|
|
createObjectName(ConfigDataId id)
Create an object name from the specified config data id.
|
|
createObjectName(ConfigDataId id,java.lang.String type)
Create an object name from the specified config data id and config data type.
|
|
createObjectName(ConfigDataId id,java.lang.String type,java.lang.String displayName)
Create an object name from specified config data id, type and name.
|
|
createObjectName(java.util.Properties props)
create ObjectName using properties
|
|
createObjectName(java.lang.String domain,java.util.Properties props)
|
|
getAttributeValue(javax.management.AttributeList attrList,java.lang.String name)
Return the value of the named attribute.
|
|
getConfigDataId(javax.management.AttributeList attrList)
Assign the config data id for the specified attribute list.
|
|
getConfigDataId(javax.management.ObjectName objName)
Get the config data id information from the specified
ObjectName .
|
|
getConfigDataType(javax.management.ObjectName objName)
Get the config data type from specified
ObjectName
|
|
getDisplayName(javax.management.ObjectName objName)
Get the config data name from specified
ObjectName
|
|
getObjectLocation(javax.management.ObjectName objName)
Get the location of the config data.
|
|
lookup(javax.management.AttributeList attrList,ConfigDataId id)
Search through the attribute list recursively and look up the attribute list with
the specified config data id.
|
|
removeAttribute(javax.management.AttributeList attrList,java.lang.String name)
Delete the specified attribute from attribute list.
|
|
setAttributeValue(javax.management.AttributeList attrList,java.lang.String name,java.lang.Object value)
Set the attribute value for the specified attribute.
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
ConfigServiceHelper
- public ConfigServiceHelper()
Method Detail
getConfigDataId
- public static ConfigDataId getConfigDataId( javax.management.AttributeList attrList)
Assign the config data id for the specified attribute list. If the config
id attribute exist already then just return the config data id, otherwise
this method assign a local ref id.
getAttributeValue
- public static java.lang.Object getAttributeValue( javax.management.AttributeList attrList,
- java.lang.String name)
- throws javax.management.AttributeNotFoundException
Return the value of the named attribute.
Parameters:
attrList
- the attribute list. name
- the name of attribute. Throws:
javax.management.AttributeNotFoundException
setAttributeValue
- public static void setAttributeValue( javax.management.AttributeList attrList,
- java.lang.String name,
- java.lang.Object value)
Set the attribute value for the specified attribute. If the attribute exists, then this method overwrites
the attribute value, otherwise it add the attribute to the attribute list.
Parameters:
attrList
- the attribute list. name
- the name of attribute. value
- the value of the attribute. removeAttribute
- public static java.lang.Object removeAttribute( javax.management.AttributeList attrList,
- java.lang.String name)
Delete the specified attribute from attribute list.
Returns:
the value of the removed attribute.
lookup
- public static javax.management.AttributeList lookup( javax.management.AttributeList attrList,
- ConfigDataId id)
Search through the attribute list recursively and look up the attribute list with
the specified config data id.
Parameters:
attrList
- the attribute list to be checked. id
- the config data id. Returns:
the nested attribute list that matches the id, null if it is not found.
createObjectName
- public static javax.management.ObjectName createObjectName( javax.management.AttributeList attrList)
Create an object name from the specified attribute list, the returned
ObjectName
can be
used to identify the config data represented by the specified attribute list, then be used in subsequent calls to
ConfigService to further query or modify this config data.
createObjectName
- public static javax.management.ObjectName createObjectName( ConfigDataId id)
Create an object name from the specified config data id.
createObjectName
- public static javax.management.ObjectName createObjectName( ConfigDataId id,
- java.lang.String type)
Create an object name from the specified config data id and config data type.
createObjectName
- public static javax.management.ObjectName createObjectName( ConfigDataId id,
- java.lang.String type,
- java.lang.String displayName)
Create an object name from specified config data id, type and name.
getConfigDataId
- public static ConfigDataId getConfigDataId( javax.management.ObjectName objName)
Get the config data id information from the specified
ObjectName
.
getConfigDataType
- public static java.lang.String getConfigDataType( javax.management.ObjectName objName)
Get the config data type from specified
ObjectName
getDisplayName
- public static java.lang.String getDisplayName( javax.management.ObjectName objName)
Get the config data name from specified
ObjectName
checkIfNameValid
- public static boolean checkIfNameValid( java.lang.String aName)
Check if the specified name is a valid object name.
getObjectLocation
- public static java.util.Properties getObjectLocation( javax.management.ObjectName objName)
Get the location of the config data.
Parameters:
objName
- object name of the object. Returns:
a Properties object holds the location for the config data. The possible keys are "cell", "node", "server", "cluster", "application", "versions", "serverTypes".
convertObjectNameToConfigDataId
- public static ConfigDataId convertObjectNameToConfigDataId( javax.management.ObjectName on)
Converts an
ObjectName
of dynamic MBean to the id of its corresponding Config data.
Note this method doesn't check the existance of ObjectName or config data id. This method just does the format conversion.
User can call the queryConfigObjects method on ConfigService to verify if the config data really exists.
Parameters:
on
- the ObjectName
of a dynamic MBean. Returns:
the id of MBean's Config data which can be used to query its detailed configuration information with ConfigService API.
createObjectName
- public static javax.management.ObjectName createObjectName( java.util.Properties props)
- throws javax.management.MalformedObjectNameException
create ObjectName using properties
Throws:
javax.management.MalformedObjectNameException
createObjectName
- public static javax.management.ObjectName createObjectName( java.lang.String domain,
- java.util.Properties props)
- throws javax.management.MalformedObjectNameException
Throws:
javax.management.MalformedObjectNameException