📄 mlet.html
字号:
<DD><DL><DT><B>Parameters:</B><DD><CODE>libdir</CODE> - The directory used by the library loader.<DT><B>See Also:</B><DD><A HREF="../../../javax/management/loading/MLet.html#getLibraryDirectory()"><CODE>getLibraryDirectory()</CODE></A></DL></DD></DL><HR><A NAME="preRegister(javax.management.MBeanServer, javax.management.ObjectName)"><!-- --></A><H3>preRegister</H3><PRE>public <A HREF="../../../javax/management/ObjectName.html" title="class in javax.management">ObjectName</A> <B>preRegister</B>(<A HREF="../../../javax/management/MBeanServer.html" title="interface in javax.management">MBeanServer</A> server, <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/Exception.html" title="class or interface in java.lang">Exception</A></PRE><DL><DD>Allows the m-let to perform any operations it needs before being registered in the MBean server. If the ObjectName is null, the m-let provides a default name for its registration <defaultDomain>:type=MLet<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/MBeanRegistration.html#preRegister(javax.management.MBeanServer, javax.management.ObjectName)">preRegister</A></CODE> in interface <CODE><A HREF="../../../javax/management/MBeanRegistration.html" title="interface in javax.management">MBeanRegistration</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>server</CODE> - The MBean server in which the m-let will be registered.<DD><CODE>name</CODE> - The object name of the m-let.<DT><B>Returns:</B><DD>The name of the m-let registered.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></CODE> - This exception should be caught by the MBean server and re-thrownas an MBeanRegistrationException.</DL></DD></DL><HR><A NAME="postRegister(java.lang.Boolean)"><!-- --></A><H3>postRegister</H3><PRE>public void <B>postRegister</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Boolean.html" title="class or interface in java.lang">Boolean</A> registrationDone)</PRE><DL><DD>Allows the m-let to perform any operations needed after having been registered in the MBean server or after the registration has failed.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/MBeanRegistration.html#postRegister(java.lang.Boolean)">postRegister</A></CODE> in interface <CODE><A HREF="../../../javax/management/MBeanRegistration.html" title="interface in javax.management">MBeanRegistration</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>registrationDone</CODE> - Indicates whether or not the m-let has been successfully registered in the MBean server. The value false means that either the registration phase has failed.</DL></DD></DL><HR><A NAME="preDeregister()"><!-- --></A><H3>preDeregister</H3><PRE>public void <B>preDeregister</B>() throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></PRE><DL><DD>Allows the m-let to perform any operations it needs before being unregistered by the MBean server.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/MBeanRegistration.html#preDeregister()">preDeregister</A></CODE> in interface <CODE><A HREF="../../../javax/management/MBeanRegistration.html" title="interface in javax.management">MBeanRegistration</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.langException</CODE> - This exception should be caught by the MBean server and re-thrown as an MBeanRegistrationException.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></CODE> - This exception will be caught by the MBean server and re-thrown as an <A HREF="../../../javax/management/MBeanRegistrationException.html" title="class in javax.management"><CODE>MBeanRegistrationException</CODE></A> or a <A HREF="../../../javax/management/RuntimeMBeanException.html" title="class in javax.management"><CODE>RuntimeMBeanException</CODE></A>.</DL></DD></DL><HR><A NAME="postDeregister()"><!-- --></A><H3>postDeregister</H3><PRE>public void <B>postDeregister</B>()</PRE><DL><DD>Allows the m-let to perform any operations needed after having been unregistered in the MBean server.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/MBeanRegistration.html#postDeregister()">postDeregister</A></CODE> in interface <CODE><A HREF="../../../javax/management/MBeanRegistration.html" title="interface in javax.management">MBeanRegistration</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="writeExternal(java.io.ObjectOutput)"><!-- --></A><H3>writeExternal</H3><PRE>public void <B>writeExternal</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/ObjectOutput.html" title="class or interface in java.io">ObjectOutput</A> out) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></PRE><DL><DD><p>Save this MLet's contents to the given <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/ObjectOutput.html" title="class or interface in java.io"><CODE>ObjectOutput</CODE></A>. Not all implementations support this method. Those that do not throw <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang"><CODE>UnsupportedOperationException</CODE></A>. A subclass may override this method to support it or to change the format of the written data.</p> <p>The format of the written data is not specified, but if an implementation supports <A HREF="../../../javax/management/loading/MLet.html#writeExternal(java.io.ObjectOutput)"><CODE>writeExternal(java.io.ObjectOutput)</CODE></A> it must also support <A HREF="../../../javax/management/loading/MLet.html#readExternal(java.io.ObjectInput)"><CODE>readExternal(java.io.ObjectInput)</CODE></A> in such a way that what is written by the former can be read by the latter.</p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Externalizable.html#writeExternal(java.io.ObjectOutput)" title="class or interface in java.io">writeExternal</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Externalizable.html" title="class or interface in java.io">Externalizable</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>out</CODE> - The object output stream to write to.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - If a problem occurred while writing.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - If this implementation does not support this operation.</DL></DD></DL><HR><A NAME="readExternal(java.io.ObjectInput)"><!-- --></A><H3>readExternal</H3><PRE>public void <B>readExternal</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/ObjectInput.html" title="class or interface in java.io">ObjectInput</A> in) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/ClassNotFoundException.html" title="class or interface in java.lang">ClassNotFoundException</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></PRE><DL><DD><p>Restore this MLet's contents from the given <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/ObjectInput.html" title="class or interface in java.io"><CODE>ObjectInput</CODE></A>. Not all implementations support this method. Those that do not throw <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang"><CODE>UnsupportedOperationException</CODE></A>. A subclass may override this method to support it or to change the format of the read data.</p> <p>The format of the read data is not specified, but if an implementation supports <A HREF="../../../javax/management/loading/MLet.html#readExternal(java.io.ObjectInput)"><CODE>readExternal(java.io.ObjectInput)</CODE></A> it must also support <A HREF="../../../javax/management/loading/MLet.html#writeExternal(java.io.ObjectOutput)"><CODE>writeExternal(java.io.ObjectOutput)</CODE></A> in such a way that what is written by the latter can be read by the former.</p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Externalizable.html#readExternal(java.io.ObjectInput)" title="class or interface in java.io">readExternal</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Externalizable.html" title="class or interface in java.io">Externalizable</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>in</CODE> - The object input stream to read from.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if a problem occurred while reading.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/ClassNotFoundException.html" title="class or interface in java.lang">ClassNotFoundException</A></CODE> - if the class for the object being restored cannot be found.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if this implementation does not support this operation.</DL></DD></DL><HR><A NAME="loadClass(java.lang.String, javax.management.loading.ClassLoaderRepository)"><!-- --></A><H3>loadClass</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A> <B>loadClass</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> name, <A HREF="../../../javax/management/loading/ClassLoaderRepository.html" title="interface in javax.management.loading">ClassLoaderRepository</A> clr) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/ClassNotFoundException.html" title="class or interface in java.lang">ClassNotFoundException</A></PRE><DL><DD><p>Load a class, using the given <A HREF="../../../javax/management/loading/ClassLoaderRepository.html" title="interface in javax.management.loading"><CODE>ClassLoaderRepository</CODE></A> if the class is not found in this MLet's URLs. The given ClassLoaderRepository can be null, in which case a <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/ClassNotFoundException.html" title="class or interface in java.lang"><CODE>ClassNotFoundException</CODE></A> occurs immediately if the class is not found in this MLet's URLs.</p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the class we want to load.<DD><CODE>clr</CODE> - The ClassLoaderRepository that will be used to search for the given class, if it is not found in this ClassLoader. May be null.<DT><B>Returns:</B><DD>The resulting Class object.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/ClassNotFoundException.html" title="class or interface in java.lang">ClassNotFoundException</A></CODE> - The specified class could not be found in this ClassLoader nor in the given ClassLoaderRepository.<DT><B>Since:</B></DT> <DD>JMX 1.1</DD></DL></DD></DL><HR><A NAME="findClass(java.lang.String)"><!-- --></A><H3>find
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -