|
J2ME RMI Optional Package | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RMIClassLoader
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.
Method Summary | |
static java.lang.String |
getClassAnnotation(java.lang.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 java.lang.ClassLoader |
getClassLoader(java.lang.String codebase)
Returns a class loader that loads classes from the given codebase URL path. |
static java.lang.Class |
loadClass(java.lang.String codebase,
java.lang.String name)
Loads a class from a codebase URL path. |
static java.lang.Class |
loadClass(java.net.URL codebase,
java.lang.String name)
Loads 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 |
public static java.lang.Class loadClass(java.net.URL codebase, java.lang.String name) throws java.net.MalformedURLException, java.lang.ClassNotFoundException
codebase
is null
, then the value of
the system property java.rmi.server.codebase
is used
in place of the given codebase
.codebase
- the URL to load the class fromname
- the name of the class to loadClass
object representing the loaded classjava.net.MalformedURLException
- if the codebase
paramater
contains an invalid non-null URLjava.lang.ClassNotFoundException
- if a definition for the class could not
be found at the specified URLpublic static java.lang.Class loadClass(java.lang.String codebase, java.lang.String name) throws java.net.MalformedURLException, java.lang.ClassNotFoundException
codebase
is null
, then the value of
the system property java.rmi.server.codebase
is used
as the URL path.codebase
- the list of space-separated URLs to load the class fromname
- the name of the class to loadClass
object representing the loaded classjava.net.MalformedURLException
- if the codebase
paramater
contains an invalid non-null URLjava.lang.ClassNotFoundException
- if a definition for the class could not
be found at the specified locationpublic static java.lang.ClassLoader getClassLoader(java.lang.String codebase) throws java.net.MalformedURLException, java.lang.SecurityException
The class loader returned is the class loader that the
loadClass(String,String)
method would use to load classes
for the same codebase
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.
codebase
- the list of space-separated URLs which the
the class loader will load classes fromjava.net.MalformedURLException
- if the codebase
paramater
contains an invalid non-null URLjava.lang.SecurityException
- if the caller does not have permission to
connect to all of the URLs in codebase
URL pathpublic static java.lang.String getClassAnnotation(java.lang.Class cl)
cl
- the class to obtain the annotation for
|
J2ME RMI Optional Package | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |