XMOJO 5 API Docs

javax.management
Class ObjectName

java.lang.Object
  |
  +--javax.management.ObjectName
All Implemented Interfaces:
java.io.Serializable

public class ObjectName
extends java.lang.Object
implements java.io.Serializable

This class represents the object name of an MBean. An instance of this class can be used to represent:

See Also:
Serialized Form

Constructor Summary
ObjectName(java.lang.String name)
          Allows an object name to be created from the given string.
ObjectName(java.lang.String domain, java.util.Hashtable table)
          Allows an object name with several key properties to be created.
ObjectName(java.lang.String domain, java.lang.String key, java.lang.String value)
          Allows an object name to be created using only one key property.
 
Method Summary
 boolean 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 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 if a name to be used 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
 

Constructor Detail

ObjectName

public ObjectName(java.lang.String name)
           throws MalformedObjectNameException
Allows an object name to be created from the given string. If the string does not have the right format an MalformedObjectNameException should be raised.
Parameters:
name - - A string representation of the object name.
Throws:
MalformedObjectNameException - - the string passed in parameter does not have the right format.

ObjectName

public ObjectName(java.lang.String domain,
                  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 an MalformedObjectNameException should be raised.
Parameters:
domain - - 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 in parameter does not have the right format.

ObjectName

public ObjectName(java.lang.String domain,
                  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 an MalformedObjectNameException should be raised.
Parameters:
domain - - 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 in parameter does not have the right format.
Method Detail

getDomain

public java.lang.String getDomain()
Returns the domain part.
Returns:
This returns the domain name

getKeyProperty

public java.lang.String getKeyProperty(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.Hashtable getKeyPropertyList()
Returns a pointer to the list of key properties.
Returns:
This returns a HashTable of key properties

isPattern

public boolean isPattern()
Checks if a name to be used is a pattern for a query.
Returns:
True if the name is a pattern, otherwise false.

toString

public java.lang.String toString()
Returns a string representation of the object name.
Overrides:
toString in class java.lang.Object
Returns:
This returns the string representation of the oject name

equals

public boolean equals(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 int hashCode()
Returns a hash code for this object name.
Overrides:
hashCode in class java.lang.Object
Returns:
This returns a hash code of type int for this object name

getCanonicalName

public java.lang.String getCanonicalName()
Returns the canonical form of the name; that is, a string representation where the properties are sorted in lexical order.
Returns:
Returns the canonical form of the name; that is, a string representation where the properties are sorted in lexical order.

getKeyPropertyListString

public java.lang.String getKeyPropertyListString()
Returns a string representation of the list of key properties specified at creation time.
Returns:
This returns a string representation of the list of key properties

getCanonicalKeyPropertyListString

public java.lang.String getCanonicalKeyPropertyListString()
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.
Returns:
This returns a string representation of the list of key properties in which the key properties are sorted in lexical order.

isPropertyPattern

public boolean isPropertyPattern()
Checks whether the object name is a pattern on the key properties.
Returns:
true if the name is a pattern, otherwise false

XMOJO 5 API Docs

Copyright ©2003 XMOJO.org. All Rights Reserved.