📄 mbeanserverfactory.html
字号:
domain is specified by the user is null.</p> <p>The standard default domain name is defined in <CODE>ServiceName.DOMAIN</CODE>.</p> <p>No reference is kept. <CODE>findMBeanServer</CODE> will not be able to return a reference to this MBeanServer object, but the garbage collector will be able to remove the MBeanServer object when it is no longer referenced.</p> <p>This method is equivalent to <code>newMBeanServer(null)</code>.</p><P><DD><DL><DT><B>Returns:</B><DD>the newly created MBeanServer.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/SecurityException.html" title="class or interface in java.lang">SecurityException</A></CODE> - if there is a SecurityManager and the caller's permissions do not include or imply <code><A HREF="../../javax/management/MBeanServerPermission.html" title="class in javax.management"><CODE>MBeanServerPermission</CODE></A>("newMBeanServer")</code>.<DD><CODE><A HREF="../../javax/management/JMRuntimeException.html" title="class in javax.management">JMRuntimeException</A></CODE> - if the property <code>javax.management.builder.initial</code> exists but the class it names cannot be instantiated through a public no-argument constructor; or if the instantiated builder returns null from its <A HREF="../../javax/management/MBeanServerBuilder.html#newMBeanServerDelegate()"><CODE>newMBeanServerDelegate</CODE></A> or <A HREF="../../javax/management/MBeanServerBuilder.html#newMBeanServer(java.lang.String, javax.management.MBeanServer, javax.management.MBeanServerDelegate)"><CODE>newMBeanServer</CODE></A> methods.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/ClassCastException.html" title="class or interface in java.lang">ClassCastException</A></CODE> - if the property <code>javax.management.builder.initial</code> exists and can be instantiated but is not assignment compatible with <A HREF="../../javax/management/MBeanServerBuilder.html" title="class in javax.management"><CODE>MBeanServerBuilder</CODE></A>.</DL></DD></DL><HR><A NAME="newMBeanServer(java.lang.String)"><!-- --></A><H3>newMBeanServer</H3><PRE>public static <A HREF="../../javax/management/MBeanServer.html" title="interface in javax.management">MBeanServer</A> <B>newMBeanServer</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)</PRE><DL><DD><p>Return a new object implementing the MBeanServer interface with the specified default domain name, without keeping an internal reference to this new object. The given domain name is used as the domain part in the ObjectName of MBeans when the domain is specified by the user is null.</p> <p>No reference is kept. <CODE>findMBeanServer</CODE> will not be able to return a reference to this MBeanServer object, but the garbage collector will be able to remove the MBeanServer object when it is no longer referenced.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>domain</CODE> - the default domain name for the created MBeanServer. This is the value that will be returned by <A HREF="../../javax/management/MBeanServer.html#getDefaultDomain()"><CODE>MBeanServer.getDefaultDomain()</CODE></A>.<DT><B>Returns:</B><DD>the newly created MBeanServer.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/SecurityException.html" title="class or interface in java.lang">SecurityException</A></CODE> - if there is a SecurityManager and the caller's permissions do not include or imply <code><A HREF="../../javax/management/MBeanServerPermission.html" title="class in javax.management"><CODE>MBeanServerPermission</CODE></A>("newMBeanServer")</code>.<DD><CODE><A HREF="../../javax/management/JMRuntimeException.html" title="class in javax.management">JMRuntimeException</A></CODE> - if the property <code>javax.management.builder.initial</code> exists but the class it names cannot be instantiated through a public no-argument constructor; or if the instantiated builder returns null from its <A HREF="../../javax/management/MBeanServerBuilder.html#newMBeanServerDelegate()"><CODE>newMBeanServerDelegate</CODE></A> or <A HREF="../../javax/management/MBeanServerBuilder.html#newMBeanServer(java.lang.String, javax.management.MBeanServer, javax.management.MBeanServerDelegate)"><CODE>newMBeanServer</CODE></A> methods.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/ClassCastException.html" title="class or interface in java.lang">ClassCastException</A></CODE> - if the property <code>javax.management.builder.initial</code> exists and can be instantiated but is not assignment compatible with <A HREF="../../javax/management/MBeanServerBuilder.html" title="class in javax.management"><CODE>MBeanServerBuilder</CODE></A>.</DL></DD></DL><HR><A NAME="findMBeanServer(java.lang.String)"><!-- --></A><H3>findMBeanServer</H3><PRE>public static <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/ArrayList.html" title="class or interface in java.util">ArrayList</A> <B>findMBeanServer</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> agentId)</PRE><DL><DD><p>Return a list of registered MBeanServer objects. A registered MBeanServer object is one that was created by one of the <code>createMBeanServer</code> methods and not subsequently released with <code>releaseMBeanServer</code>.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>agentId</CODE> - The agent identifier of the MBeanServer to retrieve. If this parameter is null, all registered MBeanServers in this JVM are returned. Otherwise, only MBeanServers whose id is equal to <code>agentId</code> are returned. The id of an MBeanServer is the <code>MBeanServerId</code> attribute of its delegate MBean.<DT><B>Returns:</B><DD>A list of MBeanServer objects.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/SecurityException.html" title="class or interface in java.lang">SecurityException</A></CODE> - if there is a SecurityManager and the caller's permissions do not include or imply <code><A HREF="../../javax/management/MBeanServerPermission.html" title="class in javax.management"><CODE>MBeanServerPermission</CODE></A>("findMBeanServer")</code>.</DL></DD></DL><HR><A NAME="getClassLoaderRepository(javax.management.MBeanServer)"><!-- --></A><H3>getClassLoaderRepository</H3><PRE>public static <A HREF="../../javax/management/loading/ClassLoaderRepository.html" title="interface in javax.management.loading">ClassLoaderRepository</A> <B>getClassLoaderRepository</B>(<A HREF="../../javax/management/MBeanServer.html" title="interface in javax.management">MBeanServer</A> server)</PRE><DL><DD>Return the ClassLoaderRepository used by the given MBeanServer. This method is equivalent to <A HREF="../../javax/management/MBeanServer.html#getClassLoaderRepository()"><CODE>server.getClassLoaderRepository()</CODE></A>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>server</CODE> - The MBeanServer under examination. Since JMX 1.2, if <code>server</code> is <code>null</code>, the result is a <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang"><CODE>NullPointerException</CODE></A>. This behaviour differs from what was implemented in JMX 1.1 - where the possibility to use <code>null</code> was deprecated.<DT><B>Returns:</B><DD>The Class Loader Repository used by the given MBeanServer.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/SecurityException.html" title="class or interface in java.lang">SecurityException</A></CODE> - if there is a SecurityManager and the caller's permissions do not include or imply <code><A HREF="../../javax/management/MBeanPermission.html" title="class in javax.management"><CODE>MBeanPermission</CODE></A>("getClassLoaderRepository")</code>.<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>server</code> is null.<DT><B>Since:</B></DT> <DD>JMX 1.1</DD></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Ent. Ed. v1.4</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../javax/management/MBeanServerDelegate.html" title="class in javax.management"><B>PREV CLASS</B></A> <A HREF="../../javax/management/MBeanServerInvocationHandler.html" title="class in javax.management"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="MBeanServerFactory.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2003 Sun Microsystems, Inc. All rights reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -