📄 mlet.html
字号:
<A NAME="MLet(java.net.URL[], java.lang.ClassLoader, boolean)"><!-- --></A><H3>MLet</H3><PRE>public <B>MLet</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A>[] urls, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang">ClassLoader</A> parent, boolean delegateToCLR)</PRE><DL><DD>Constructs a new MLet for the given URLs. The URLs will be searched in the order specified for classes and resources after first searching in the specified parent class loader. The parent argument will be used as the parent class loader for delegation. The factory argument will be used as the stream handler factory to obtain protocol handlers when creating new URLs.<P><DT><B>Parameters:</B><DD><CODE>urls</CODE> - The URLs from which to load classes and resources.<DD><CODE>parent</CODE> - The parent class loader for delegation.<DD><CODE>delegateToCLR</CODE> - True if, when a class is not found in either the parent ClassLoader or the URLs, the MLet should delegate to its containing MBeanServer's <A HREF="../../../javax/management/loading/ClassLoaderRepository.html" title="interface in javax.management.loading"><CODE>ClassLoaderRepository</CODE></A>.<DT><B>Since:</B></DT> <DD>JMX 1.2</DD></DL><HR><A NAME="MLet(java.net.URL[], java.lang.ClassLoader, java.net.URLStreamHandlerFactory, boolean)"><!-- --></A><H3>MLet</H3><PRE>public <B>MLet</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A>[] urls, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang">ClassLoader</A> parent, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/net/URLStreamHandlerFactory.html" title="class or interface in java.net">URLStreamHandlerFactory</A> factory, boolean delegateToCLR)</PRE><DL><DD>Constructs a new MLet for the specified URLs, parent class loader, and URLStreamHandlerFactory. The parent argument will be used as the parent class loader for delegation. The factory argument will be used as the stream handler factory to obtain protocol handlers when creating new URLs.<P><DT><B>Parameters:</B><DD><CODE>urls</CODE> - The URLs from which to load classes and resources.<DD><CODE>parent</CODE> - The parent class loader for delegation.<DD><CODE>factory</CODE> - The URLStreamHandlerFactory to use when creating URLs.<DD><CODE>delegateToCLR</CODE> - True if, when a class is not found in either the parent ClassLoader or the URLs, the MLet should delegate to its containing MBeanServer's <A HREF="../../../javax/management/loading/ClassLoaderRepository.html" title="interface in javax.management.loading"><CODE>ClassLoaderRepository</CODE></A>.<DT><B>Since:</B></DT> <DD>JMX 1.2</DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="addURL(java.net.URL)"><!-- --></A><H3>addURL</H3><PRE>public void <B>addURL</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A> url)</PRE><DL><DD>Appends the specified URL to the list of URLs to search for classes and resources.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/loading/MLetMBean.html#addURL(java.net.URL)">addURL</A></CODE> in interface <CODE><A HREF="../../../javax/management/loading/MLetMBean.html" title="interface in javax.management.loading">MLetMBean</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="addURL(java.lang.String)"><!-- --></A><H3>addURL</H3><PRE>public void <B>addURL</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> url) throws <A HREF="../../../javax/management/ServiceNotFoundException.html" title="class in javax.management">ServiceNotFoundException</A></PRE><DL><DD>Appends the specified URL to the list of URLs to search for classes and resources.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/loading/MLetMBean.html#addURL(java.lang.String)">addURL</A></CODE> in interface <CODE><A HREF="../../../javax/management/loading/MLetMBean.html" title="interface in javax.management.loading">MLetMBean</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>url</CODE> - the URL to add.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/management/ServiceNotFoundException.html" title="class in javax.management">ServiceNotFoundException</A></CODE> - The specified URL is malformed.</DL></DD></DL><HR><A NAME="getURLs()"><!-- --></A><H3>getURLs</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A>[] <B>getURLs</B>()</PRE><DL><DD>Returns the search path of URLs for loading classes and resources. This includes the original list of URLs specified to the constructor, along with any URLs subsequently appended by the addURL() method.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/loading/MLetMBean.html#getURLs()">getURLs</A></CODE> in interface <CODE><A HREF="../../../javax/management/loading/MLetMBean.html" title="interface in javax.management.loading">MLetMBean</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getMBeansFromURL(java.net.URL)"><!-- --></A><H3>getMBeansFromURL</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A> <B>getMBeansFromURL</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A> url) throws <A HREF="../../../javax/management/ServiceNotFoundException.html" title="class in javax.management">ServiceNotFoundException</A></PRE><DL><DD>Loads a text file containing MLET tags that define the MBeans to be added to the agent. The location of the text file is specified by a URL. The MBeans specified in the MLET file will be instantiated and registered by the MBean server.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/loading/MLetMBean.html#getMBeansFromURL(java.net.URL)">getMBeansFromURL</A></CODE> in interface <CODE><A HREF="../../../javax/management/loading/MLetMBean.html" title="interface in javax.management.loading">MLetMBean</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>url</CODE> - The URL of the text file to be loaded as URL object.<DT><B>Returns:</B><DD>A set containing one entry per MLET tag in the m-let text file loaded. Each entry specifies either the ObjectInstance for the created MBean, or a throwable object (that is, an error or an exception) if the MBean could not be created.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/management/ServiceNotFoundException.html" title="class in javax.management">ServiceNotFoundException</A></CODE> - One of the following errors has occurred: The m-let text file does not contain an MLET tag, the m-let text file is not found, a mandatory attribute of the MLET tag is not specified, the value of url is null.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - MLet MBean is not registered with an MBeanServer.</DL></DD></DL><HR><A NAME="getMBeansFromURL(java.lang.String)"><!-- --></A><H3>getMBeansFromURL</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A> <B>getMBeansFromURL</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> url) throws <A HREF="../../../javax/management/ServiceNotFoundException.html" title="class in javax.management">ServiceNotFoundException</A></PRE><DL><DD>Loads a text file containing MLET tags that define the MBeans to be added to the agent. The location of the text file is specified by a URL. The MBeans specified in the MLET file will be instantiated and registered by the MBean server.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/loading/MLetMBean.html#getMBeansFromURL(java.lang.String)">getMBeansFromURL</A></CODE> in interface <CODE><A HREF="../../../javax/management/loading/MLetMBean.html" title="interface in javax.management.loading">MLetMBean</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>url</CODE> - The URL of the text file to be loaded as String object.<DT><B>Returns:</B><DD>A set containing one entry per MLET tag in the m-let text file loaded. Each entry specifies either the ObjectInstance for the created MBean, or a throwable object (that is, an error or an exception) if the MBean could not be created.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/management/ServiceNotFoundException.html" title="class in javax.management">ServiceNotFoundException</A></CODE> - One of the following errors has occurred: The m-let text file does not contain an MLET tag, the m-let text file is not found, a mandatory attribute of the MLET tag is not specified, the url is malformed.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - MLet MBean is not registered with an MBeanServer.</DL></DD></DL><HR><A NAME="getLibraryDirectory()"><!-- --></A><H3>getLibraryDirectory</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>getLibraryDirectory</B>()</PRE><DL><DD>Gets the current directory used by the library loader for storing native libraries before they are loaded into memory.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/loading/MLetMBean.html#getLibraryDirectory()">getLibraryDirectory</A></CODE> in interface <CODE><A HREF="../../../javax/management/loading/MLetMBean.html" title="interface in javax.management.loading">MLetMBean</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>The current directory used by the library loader.<DT><B>See Also:</B><DD><A HREF="../../../javax/management/loading/MLet.html#setLibraryDirectory(java.lang.String)"><CODE>setLibraryDirectory(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="setLibraryDirectory(java.lang.String)"><!-- --></A><H3>setLibraryDirectory</H3><PRE>public void <B>setLibraryDirectory</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> libdir)</PRE><DL><DD>Sets the directory used by the library loader for storing native libraries before they are loaded into memory.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/loading/MLetMBean.html#setLibraryDirectory(java.lang.String)">setLibraryDirectory</A></CODE> in interface <CODE><A HREF="../../../javax/management/loading/MLetMBean.html" title="interface in javax.management.loading">MLetMBean</A></CODE></DL></DD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -