All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.jaw.reference.common.ObjectName
java.lang.Object
|
+----com.sun.jaw.reference.common.ObjectName
- public class ObjectName
- extends Object
- implements Serializable
This class is used for representing an object name. An instance of
this class can be used for representing:
- An object name
- An object name within the context of a query
An object name follows this rule:
domainName:className[.keyProperty=value[,keyProperty=value]*]
The variable parts of this rule are:
- domainName
- The name of the
domain within which the object exists. The domain provides a structure
for the naming space within a Java Dynamic Management agent or within a global
management domain. A simple example of a domain is to use the host
name of the machine on which the agent is running as the domain name
for all the objects controlled by the agent. The domain name is
followed by a colon (:). If the domain name is not present, the domain is
controlled by the server.
- className
- The class of object that the
object represents. This class does not need to correspond to the Java
class of the object.
- key
- An attribute that represents a search key
for naming the object. A key attribute used to name an object does not
need to correspond to a property within the object.
- value
- The value
assigned to key. Search keys for naming the object enable unique
names to be assigned to instances of the same class. The first key
attribute-value pair must be preceded by a period (.). An object name can contain
any number of key attribute-value pairs, each separated by a comma
(,). Search keys for naming an object are optional. If no search keys
are specified, only one instance of the class is
permitted within the domain. Such a class is called a singleton.
-
ObjectName(String)
- Allows an object name to be created given a string.
-
ObjectName(String, String)
- Allows an object name without a key property to be created.
-
ObjectName(String, String, Hashtable)
- Allows an object name with several key properties to be created.
-
ObjectName(String, String, String, Object)
- Allows an object name using only one key property to be created.
-
equals(Object)
-
Compares the current object name with another object name.
-
getCanonicalName()
- Obtains the canonical name.
-
getCanonicalPropertyListString()
- Obtains a string representation of the list of properties
in which the properties are sorted.
-
getClassName()
- Obtains the class part.
-
getDomain()
- Obtains the domain part.
-
getProperty(String)
- Obtains the value of a property in a search key.
-
getPropertyList()
- Obtains a pointer to the list of properties.
-
getPropertyListString()
- Obtains a string representation of the list of properties specified at creation time.
-
hashCode()
- Returns a hash code for this object name.
-
isPropertyListEmpty()
- Checks if there are no key properties defined for this object name.
-
toString()
- Translates an object name into a string.
-
validNameForObject()
- Checks if a name to be used as an object name is valid.
ObjectName
public ObjectName(String domain,
String className,
Hashtable table) throws IllegalArgumentException
- Allows an object name with several key properties to be created.
- Parameters:
- domain - The domain
part of the object name.
- className - The class
part of the object name.
- table - A hash table containing one or more
search keys. Each search key is an
attribute-value pair.
- Throws: IllegalArgumentException
- One of the parameters in the call to the method is
invalid.
ObjectName
public ObjectName(String domain,
String className,
String key,
Object value) throws IllegalArgumentException
- Allows an object name using only one key property to be created.
- Parameters:
- domain - The domain
part of the object name.
- className - The class
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: IllegalArgumentException
- One of the parameters in the call to the method is
invalid.
ObjectName
public ObjectName(String domain,
String className) throws IllegalArgumentException
- Allows an object name without a key property to be created.
- Parameters:
- domain - The domain
part of the object name.
- className - The class
part of the object name.
- Throws: IllegalArgumentException
- One of the parameters in the call to the method is
invalid.
ObjectName
public ObjectName(String name) throws IllegalArgumentException
- Allows an object name to be created given a string.
- Parameters:
- name - A string representation
of the object name.
- Throws: IllegalArgumentException
- One of the parameters in the call to the method is
invalid.
toString
public String toString()
- Translates an object name into a string.
- Returns:
- A string representation
of the object name.
- Overrides:
- toString in class Object
equals
public boolean equals(Object object)
- Compares the current object name with another object name.
- 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.
- Overrides:
- equals in class Object
hashCode
public int hashCode()
- Returns a hash code for this object name.
- Returns:
- A hash code value for this object name.
- Overrides:
- hashCode in class Object
validNameForObject
public boolean validNameForObject()
- Checks if a name to be used as an object name is valid.
- Returns:
- True if the name is valid, otherwise false.
isPropertyListEmpty
public boolean isPropertyListEmpty()
- Checks if there are no key properties defined for this object name.
- Returns:
- True if there are no key properties defined for this this
object name, otherwise false.
getCanonicalName
public String getCanonicalName()
- Obtains the canonical name. A canonical name is a string representation of
the name in which the properties are sorted.
- Returns:
- The canonical name.
getDomain
public String getDomain()
- Obtains the domain part.
- Returns:
- The domain part.
getClassName
public String getClassName()
- Obtains the class part.
- Returns:
- The class part.
getProperty
public Object getProperty(String property)
- Obtains the value of a property in a search key.
- Parameters:
- The - property the value of which is to be obtained.
- Returns:
- The value of the property.
getPropertyList
public Hashtable getPropertyList()
- Obtains a pointer to the list of properties.
- Returns:
- A pointer to the list of properties.
getPropertyListString
public String getPropertyListString()
- Obtains a string representation of the list of properties specified at creation time.
- Returns:
- A string representation of the list of properties.
getCanonicalPropertyListString
public String getCanonicalPropertyListString()
- Obtains a string representation of the list of properties
in which the properties are sorted.
- Returns:
- A string representation of the list of properties
in which the properties are sorted.
All Packages Class Hierarchy This Package Previous Next Index