📄 objectname.html
字号:
<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - A string representation of the object name.<DT><B>Returns:</B><DD>an ObjectName corresponding to the given String.<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/management/MalformedObjectNameException.html" title="class in javax.management">MalformedObjectNameException</A></CODE> - The string passed as a parameter does not have the right format.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - The <code>name</code> parameter is null.<DT><B>Since:</B></DT> <DD>JMX 1.2</DD></DL></DD></DL><HR><A NAME="getInstance(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>getInstance</H3><PRE>public static <A HREF="../../javax/management/ObjectName.html" title="class in javax.management">ObjectName</A> <B>getInstance</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> domain, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> key, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value) throws <A HREF="../../javax/management/MalformedObjectNameException.html" title="class in javax.management">MalformedObjectNameException</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></PRE><DL><DD><p>Return an instance of ObjectName that can be used anywhere an object obtained with <A HREF="../../javax/management/ObjectName.html#ObjectName(java.lang.String, java.lang.String, java.lang.String)"><CODE>new ObjectName(domain, key, value)</CODE></A> can be used. The returned object may be of a subclass of ObjectName. Calling this method twice with the same parameters may return the same object or two equal but not identical objects.</p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>domain</CODE> - The domain part of the object name.<DD><CODE>key</CODE> - The attribute in the key property of the object name.<DD><CODE>value</CODE> - The value in the key property of the object name.<DT><B>Returns:</B><DD>an ObjectName corresponding to the given domain, key, and value.<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/management/MalformedObjectNameException.html" title="class in javax.management">MalformedObjectNameException</A></CODE> - The <code>domain</code>, <code>key</code>, or <code>value</code> contains an illegal character, or <code>value</code> does not follow the rules for quoting.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - One of the parameters is null.<DT><B>Since:</B></DT> <DD>JMX 1.2</DD></DL></DD></DL><HR><A NAME="getInstance(java.lang.String, java.util.Hashtable)"><!-- --></A><H3>getInstance</H3><PRE>public static <A HREF="../../javax/management/ObjectName.html" title="class in javax.management">ObjectName</A> <B>getInstance</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> domain, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Hashtable.html" title="class or interface in java.util">Hashtable</A> table) throws <A HREF="../../javax/management/MalformedObjectNameException.html" title="class in javax.management">MalformedObjectNameException</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></PRE><DL><DD><p>Return an instance of ObjectName that can be used anywhere an object obtained with <A HREF="../../javax/management/ObjectName.html#ObjectName(java.lang.String, java.util.Hashtable)"><CODE>new ObjectName(domain, table)</CODE></A> can be used. The returned object may be of a subclass of ObjectName. Calling this method twice with the same parameters may return the same object or two equal but not identical objects.</p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>domain</CODE> - The domain part of the object name.<DD><CODE>table</CODE> - A hash table containing one or more key properties. The key of each entry in the table is the key of a key property in the object name. The associated value in the table is the associated value in the object name.<DT><B>Returns:</B><DD>an ObjectName corresponding to the given domain and key mappings.<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/management/MalformedObjectNameException.html" title="class in javax.management">MalformedObjectNameException</A></CODE> - The <code>domain</code> contains an illegal character, or one of the keys or values in <code>table</code> contains an illegal character, or one of the values in <code>table</code> does not follow the rules for quoting.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - One of the parameters is null.<DT><B>Since:</B></DT> <DD>JMX 1.2</DD></DL></DD></DL><HR><A NAME="getInstance(javax.management.ObjectName)"><!-- --></A><H3>getInstance</H3><PRE>public static <A HREF="../../javax/management/ObjectName.html" title="class in javax.management">ObjectName</A> <B>getInstance</B>(<A HREF="../../javax/management/ObjectName.html" title="class in javax.management">ObjectName</A> name) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></PRE><DL><DD><p>Return an instance of ObjectName that can be used anywhere the given object can be used. The returned object may be of a subclass of ObjectName. If <code>name</code> is of a subclass of ObjectName, it is not guaranteed that the returned object will be of the same class.</p> <p>The returned value may or may not be identical to <code>name</code>. Calling this method twice with the same parameters may return the same object or two equal but not identical objects.</p> <p>Since ObjectName is immutable, it is not usually useful to make a copy of an ObjectName. The principal use of this method is to guard against a malicious caller who might pass an instance of a subclass with surprising behaviour to sensitive code. Such code can call this method to obtain an ObjectName that is known not to have surprising behaviour.</p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - an instance of the ObjectName class or of a subclass<DT><B>Returns:</B><DD>an instance of ObjectName or a subclass that is known to have the same semantics. If <code>name</code> respects the semantics of ObjectName, then the returned object is equal (though not necessarily identical) to <code>name</code>.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - The <code>name</code> is null.<DT><B>Since:</B></DT> <DD>JMX 1.2</DD></DL></DD></DL><HR><A NAME="isPattern()"><!-- --></A><H3>isPattern</H3><PRE>public boolean <B>isPattern</B>()</PRE><DL><DD>Checks whether the object name is a pattern. An object name is a pattern if its domain contains a wildcard or if the object name is a property pattern.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>True if the name is a pattern, otherwise false.</DL></DD></DL><HR><A NAME="isDomainPattern()"><!-- --></A><H3>isDomainPattern</H3><PRE>public boolean <B>isDomainPattern</B>()</PRE><DL><DD>Checks whether the object name is a pattern on the domain part.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>True if the name is a domain pattern, otherwise false.<DT><B>Since:</B></DT> <DD>JMX 1.2</DD></DL></DD></DL><HR><A NAME="isPropertyPattern()"><!-- --></A><H3>isPropertyPattern</H3><PRE>public boolean <B>isPropertyPattern</B>()</PRE><DL><DD>Checks whether the object name is a pattern on the key properties.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>True if the name is a pattern, otherwise false.</DL></DD></DL><HR><A NAME="getCanonicalName()"><!-- --></A><H3>getCanonicalName</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getCanonicalName</B>()</PRE><DL><DD><p>Returns the canonical form of the name; that is, a string representation where the properties are sorted in lexical order.</p> <p>More precisely, the canonical form of the name is a String consisting of the <em>domain part</em>, a colon (<code>:</code>), the <em>canonical key property list</em>, and a <em>pattern indication</em>.</p> <p>The <em>canonical key property list</em> is the same string as described for <A HREF="../../javax/management/ObjectName.html#getCanonicalKeyPropertyListString()"><CODE>getCanonicalKeyPropertyListString()</CODE></A>.</p> <p>The <em>pattern indication</em> is: <ul> <li>empty for an ObjectName that is not a property pattern; <li>an asterisk for an ObjectName that is a property pattern with no keys; or <li>a comma and an asterisk (<code>,*</code>) for an ObjectName that is a property pattern with at least one key. </ul></p><P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>The canonical form of the name.</DL></DD></DL><HR><A NAME="getDomain()"><!-- --></A><H3>getDomain</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getDomain</B>()</PRE><DL><DD>Returns the domain part.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the domain.</DL></DD></DL><HR><A NAME="getKeyProperty(java.lang.String)"><!-- --></A><H3>getKeyProperty</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getKeyProperty</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> property) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></PRE><DL><DD>Obtains the value associated with a key in a key property.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>property</CODE> - The property whose value is to be obtained.<DT><B>Returns:</B><DD>The value of the property, or null if there is no such property in this ObjectName.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - If <code>property</code> is null.</DL></DD></DL><HR><A NAME="getKeyPropertyList()"><!-- --></A><H3>getKeyPropertyList</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Hashtable.html" title="class or interface in java.util">Hashtable</A> <B>getKeyPropertyList</B>()</PRE><DL><DD><p>Returns the key properties as a Hashtable. The returned value is a Hashtable in which each key is a key in the ObjectName's key property list and each value is the associated value.</p> <p>The returned value may be unmodifiable. If it is modifiable, changing it has no effect on this ObjectName.</p><P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>The table of key properties.</DL></DD></DL><HR><A NAME="getKeyPropertyListString()"><!-- --></A><H3>getKeyPropertyListString</H3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -