Java Platform 1.2

java.rmi.server
Class RMIClassLoader

java.lang.Object
  |
  +--java.rmi.server.RMIClassLoader

public class RMIClassLoader
extends Object

RMIClassLoader 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.

Since:
JDK1.1

Method Summary
static String getClassAnnotation(Class cl)
          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.
static Object getSecurityContext(ClassLoader loader)
          Deprecated. no replacement. As of JDK1.2, RMI no longer uses this method to obtain a classloader's security context.
static Class loadClass(String name)
          Deprecated. replaced by loadClass(String,String) method
static Class loadClass(String codebase, String name)
          Load a class from a codebase URL path.
static Class loadClass(URL codebase, String name)
          Load a class from a codebase URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

loadClass

public static Class loadClass(String name)
                       throws MalformedURLException,
                              ClassNotFoundException
Deprecated. replaced by loadClass(String,String) method
Load a class from the codebase URL path specified by the java.rmi.server.codebase property.
Parameters:
name - the name of the class to load
Returns:
the Class object representing the loaded class
Throws:
MalformedURLException - if the system property java.rmi.server.codebase contains an invalid URL
ClassNotFoundException - if a definition for the class could not be found at the codebase location
Since:
JDK1.1
See Also:
loadClass(String,String)

loadClass

public static Class loadClass(URL codebase,
                              String name)
                       throws MalformedURLException,
                              ClassNotFoundException
Load a class from a codebase URL.
Parameters:
codebase - the URL to load the class from
name - the name of the class to load
Returns:
the Class object representing the loaded class
Throws:
MalformedURLException - if the codebase paramater contains an invalid URL
ClassNotFoundException - if a definition for the class could not be found at the specified URL
Since:
JDK1.1

loadClass

public static Class loadClass(String codebase,
                              String name)
                       throws MalformedURLException,
                              ClassNotFoundException
Load a class from a codebase URL path.
Parameters:
codebase - the list of URLs to load the class from
name - the name of the class to load
Returns:
the Class object representing the loaded class
Throws:
MalformedURLException - if the codebase paramater contains an invalid URL
ClassNotFoundException - if a definition for the class could not be found at the specified location
Since:
JDK1.2

getClassAnnotation

public static String getClassAnnotation(Class cl)
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.
Parameters:
cl - the class to obtain the annotation for
Returns:
a string to be used to annotate the class when marshalled
Since:
JDK1.2

getSecurityContext

public static Object getSecurityContext(ClassLoader loader)
Deprecated. no replacement. As of JDK1.2, RMI no longer uses this method to obtain a classloader's security context.
Return the security context of the given class loader.
Parameters:
loader - a class loader from which to get the security context
Returns:
the security context
Since:
JDK1.1
See Also:
SecurityManager.getSecurityContext()

Java Platform 1.2

Submit a bug or feature Version 1.2 of Java Platform API Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.