📄 rmiclassloader.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu May 30 13:46:52 EDT 2002 --><TITLE>J2ME RMI Optional Package Specification v1.0: Class RMIClassLoader</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <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-files/index-1.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>J2ME RMI Optional Package</EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../java/rmi/server/RemoteStub.html"><B>PREV CLASS</B></A> <A HREF="../../../java/rmi/server/RMISocketFactory.html"><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="RMIClassLoader.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | 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><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.rmi.server</FONT><BR>Class RMIClassLoader</H2><PRE>java.lang.Object | +--<B>java.rmi.server.RMIClassLoader</B></PRE><HR><DL><DT>public class <B>RMIClassLoader</B><DT>extends java.lang.Object</DL><P><code>RMIClassLoader</code> provides static methods for loading classes from a network location (one or more URLs) and obtaining the location from which an existing class can be loaded. These methods are used by the RMI runtime when marshalling and unmarshalling classes of parameters and return values.<P><DL><DT><B>Since: </B><DD>JDK1.1</DD></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/server/RMIClassLoader.html#getClassAnnotation(java.lang.Class)">getClassAnnotation</A></B>(java.lang.Class cl)</CODE><BR> Returns the class annotation (representing the location for a class) that RMI will use to annotate the call stream when marshalling objects of the given class.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.ClassLoader</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/server/RMIClassLoader.html#getClassLoader(java.lang.String)">getClassLoader</A></B>(java.lang.String codebase)</CODE><BR> Returns a class loader that loads classes from the given codebase URL path.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.Class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/server/RMIClassLoader.html#loadClass(java.lang.String, java.lang.String)">loadClass</A></B>(java.lang.String codebase, java.lang.String name)</CODE><BR> Loads a class from a codebase URL path.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.Class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/server/RMIClassLoader.html#loadClass(java.net.URL, java.lang.String)">loadClass</A></B>(java.net.URL codebase, java.lang.String name)</CODE><BR> Loads a class from a codebase URL.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="loadClass(java.net.URL, java.lang.String)"><!-- --></A><H3>loadClass</H3><PRE>public static java.lang.Class <B>loadClass</B>(java.net.URL codebase, java.lang.String name) throws java.net.MalformedURLException, java.lang.ClassNotFoundException</PRE><DL><DD>Loads a class from a codebase URL. If <code>codebase</code> is <code>null</code>, then the value of the system property <code>java.rmi.server.codebase</code> is used in place of the given <code>codebase</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>codebase</CODE> - the URL to load the class from<DD><CODE>name</CODE> - the name of the class to load<DT><B>Returns:</B><DD>the <code>Class</code> object representing the loaded class<DT><B>Throws:</B><DD><CODE>java.net.MalformedURLException</CODE> - if the <code>codebase</code> paramater contains an invalid non-null URL<DD><CODE>java.lang.ClassNotFoundException</CODE> - if a definition for the class could not be found at the specified URL<DT><B>Since: </B><DD>JDK1.1</DD></DL></DD></DL><HR><A NAME="loadClass(java.lang.String, java.lang.String)"><!-- --></A><H3>loadClass</H3><PRE>public static java.lang.Class <B>loadClass</B>(java.lang.String codebase, java.lang.String name) throws java.net.MalformedURLException, java.lang.ClassNotFoundException</PRE><DL><DD>Loads a class from a codebase URL path. If <code>codebase</code> is <code>null</code>, then the value of the system property <code>java.rmi.server.codebase</code> is used as the URL path.<DD><DL><DT><B>Parameters:</B><DD><CODE>codebase</CODE> - the list of space-separated URLs to load the class from<DD><CODE>name</CODE> - the name of the class to load<DT><B>Returns:</B><DD>the <code>Class</code> object representing the loaded class<DT><B>Throws:</B><DD><CODE>java.net.MalformedURLException</CODE> - if the <code>codebase</code> paramater contains an invalid non-null URL<DD><CODE>java.lang.ClassNotFoundException</CODE> - if a definition for the class could not be found at the specified location<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="getClassLoader(java.lang.String)"><!-- --></A><H3>getClassLoader</H3><PRE>public static java.lang.ClassLoader <B>getClassLoader</B>(java.lang.String codebase) throws java.net.MalformedURLException, java.lang.SecurityException</PRE><DL><DD>Returns a class loader that loads classes from the given codebase URL path. <p>The class loader returned is the class loader that the <A HREF="../../../java/rmi/server/RMIClassLoader.html#loadClass(java.lang.String, java.lang.String)"><CODE>loadClass(String,String)</CODE></A> method would use to load classes for the same <code>codebase</code> argument. If a class loader for the same codebase URL path already exists for RMI runtime, it will be returned; otherwise, a new class loader will be created.<DD><DL><DT><B>Parameters:</B><DD><CODE>codebase</CODE> - the list of space-separated URLs which the the class loader will load classes from<DT><B>Returns:</B><DD>a class loader that loads classes from the given codebase URL path<DT><B>Throws:</B><DD><CODE>java.net.MalformedURLException</CODE> - if the <code>codebase</code> paramater contains an invalid non-null URL<DD><CODE>java.lang.SecurityException</CODE> - if the caller does not have permission to connect to all of the URLs in <code>codebase</code> URL path<DT><B>Since: </B><DD>1.3</DD></DL></DD></DL><HR><A NAME="getClassAnnotation(java.lang.Class)"><!-- --></A><H3>getClassAnnotation</H3><PRE>public static java.lang.String <B>getClassAnnotation</B>(java.lang.Class cl)</PRE><DL><DD>Returns the class annotation (representing the location for a class) that RMI will use to annotate the call stream when marshalling objects of the given class.<DD><DL><DT><B>Parameters:</B><DD><CODE>cl</CODE> - the class to obtain the annotation for<DT><B>Returns:</B><DD>a string to be used to annotate the class when marshalled<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <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-files/index-1.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>J2ME RMI Optional Package</EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../java/rmi/server/RemoteStub.html"><B>PREV CLASS</B></A> <A HREF="../../../java/rmi/server/RMISocketFactory.html"><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="RMIClassLoader.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | 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><!-- =========== END OF NAVBAR =========== --><HR><font size="-1">Copyright 1994-2002 Sun Microsystems, Inc. All Rights Reserved.</font> </BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -