javax.management
Class ObjectNamejava.lang.Objec | +--javax.management.ObjectName
- public class
ObjectName
- extends java.lang.Object
- implements java.io.Serializable
Represents the object name of an MBean. An instance of this class can be used to represent:
An object name An object name pattern, within the context of a query
Version:
- 1.20
Author:
- Cosimo Vampo, Raimondo Castino, Eliseba Costantini, Massimiliano Parlione, Ken Barron, Massimo Tarquini, Marco Melillo
See Also:
- Serialized Form
Constructor Summary
java.lang.String)">ObjectName(java.lang.String objectNameString)
Allows an object name to be created from the given string.java.lang.String, java.util.Hashtable)">ObjectName(java.lang.String domainName, java.util.Hashtable table)
Allows an object name with several key properties to be created.java.lang.String, java.lang.String, java.lang.String)">ObjectName(java.lang.String domainName, java.lang.String key, java.lang.String value)
Allows an object name to be created using only one key property.
Method Summary
boolean java.lang.Object)">equals(java.lang.Object object)
Compares the current object name with another object name.java.lang.String getCanonicalKeyPropertyListString()
Returns a string representation of the list of key properties, in which the key properties are sorted in lexical order.java.lang.String getCanonicalName()
Returns the canonical form of the name; that is, a string representation where the properties are sorted in lexical order.java.lang.String getDomain()
Returns the domain part.java.lang.String java.lang.String)">getKeyProperty(java.lang.String property)
Obtains the value of a key property in a key property.java.util.Hashtable getKeyPropertyList()
Returns a pointer to the list of key properties.java.lang.String getKeyPropertyListString()
Returns a string representation of the list of key properties specified at creation time.int hashCode()
Returns a hash code for this object name.boolean isPattern()
Checks whether the object name is a pattern for a query.boolean isPropertyPattern()
Checks whether the object name is a pattern on the key properties.java.lang.String toString()
Returns a string representation of the object name.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait java.lang.String, java.util.Hashtable)">
Constructor Detail
ObjectName
publicObjectName
(java.lang.String domainName, java.util.Hashtable table) throws MalformedObjectNameException
- Allows an object name with several key properties to be created. If the parameters do not have the right format a MalformedObjectNameException should be raised.
Parameters:
- domainName - The domain part of the object name.
- table - A hash table containing one or more search keys. Each search key is an attribute-value pair.
Throws:
- MalformedObjectNameException - The string passed as a parameter does not have the right format.
java.lang.String, java.lang.String, java.lang.String)">
ObjectName
publicObjectName
(java.lang.String domainName, java.lang.String key, java.lang.String value) throws MalformedObjectNameException
- Allows an object name to be created using only one key property. If the parameters do not have the right format a MalformedObjectNameException should be raised.
Parameters:
- domainName - The domain part of the object name.
- key - The attribute in the key property of the object name.
- value - The value in the key property of the object name.
- Throws:
- MalformedObjectNameException - The string passed as a parameter does not have the right format.
java.lang.String)">
ObjectName
publicObjectName
(java.lang.String objectNameString) throws MalformedObjectNameException
- Allows an object name to be created from the given string. If the string does not have the right format a MalformedObjectNameException should be raised.
Parameters:
- objectNameString - A string representation of the object name.
- Throws:
- MalformedObjectNameException - The string passed as a parameter does not have the right format.
Method Detail
toString
public java.lang.StringtoString
()
- Returns a string representation of the object name.
Overrides:
- toString in class java.lang.Object
java.lang.Object)">
equals
public booleanequals
(java.lang.Object object)
- Compares the current object name with another object name.
Overrides:
- equals in class java.lang.Object
Parameters:
- object - The object name that the current object name is to be compared with.
Returns:
- True if the two object names are equal, otherwise false.
hashCode
public inthashCode
()
getDomain
public java.lang.StringgetDomain
()
- Returns the domain part.
getCanonicalKeyPropertyListString
public java.lang.StringgetCanonicalKeyPropertyListString
()
- Returns a string representation of the list of key properties, in which the key properties are sorted in lexical order. This is used in lexicographic comparisons performed in order to select MBeans based on their key property list.
getCanonicalName
public java.lang.StringgetCanonicalName
()
- Returns the canonical form of the name; that is, a string representation where the properties are sorted in lexical order.
java.lang.String)">
getKeyProperty
public java.lang.StringgetKeyProperty
(java.lang.String property)
- Obtains the value of a key property in a key property.
Parameters:
- property - The property whose value is to be obtained.
- Returns:
- The value of the property.
getKeyPropertyList
public java.util.HashtablegetKeyPropertyList
()
- Returns a pointer to the list of key properties.
getKeyPropertyListString
public java.lang.StringgetKeyPropertyListString
()
- Returns a string representation of the list of key properties specified at creation time.
isPattern
public booleanisPattern
()
- Checks whether the object name is a pattern for a query.
Returns:
- True if the name is a pattern, otherwise false.
isPropertyPattern
public booleanisPropertyPattern
()
- Checks whether the object name is a pattern on the key properties.
Returns:
- True if the name is a pattern, otherwise false.