| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public abstract class RMIClassLoaderSpi extends Object
RMIClassLoaderSpi
is the service provider interface for
RMIClassLoader
.
In particular, an RMIClassLoaderSpi
instance provides an
implementation of the following static methods of
RMIClassLoader
:
Constructor Summary | |
---|---|
|
Method Summary | |
---|---|
abstract String |
Provides the implementation for java.rmi.server.RMIClassLoader.getClassAnnotation. |
abstract ClassLoader |
getClassLoader(String codebase) Provides the implementation for java.rmi.server.RMIClassLoader.getClassLoader. |
abstract Class |
loadClass(String codebase, String name, ClassLoader defaultLoader) Provides the implementation for java.rmi.server.RMIClassLoader.loadClass, java.rmi.server.RMIClassLoader.loadClass, and java.rmi.server.RMIClassLoader.loadClass. |
abstract Class |
loadProxyClass(String codebase, String[] interfaces, ClassLoader defaultLoader) Provides the implementation for java.rmi.server.RMIClassLoader.loadProxyClass. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RMIClassLoaderSpi()
Method Detail |
---|
public abstract String getClassAnnotation(Class cl)
cl
- the class to obtain the annotation fornull
public abstract ClassLoader getClassLoader(String codebase) throws MalformedURLException
If there is a security manger, its checkPermission
method will be invoked with a
RuntimePermission("getClassLoader")
permission;
this could result in a SecurityException
.
The implementation of this method may also perform further security
checks to verify that the calling context has permission to connect
to all of the URLs in the codebase URL path.
codebase
- the list of URLs (space-separated) from which
the returned class loader will load classes from, or null
MalformedURLException
- if codebase
is
non-null
and contains an invalid URL, or
if codebase
is null
and a provider-specific
URL used to identify the class loader is invalidpublic abstract Class loadClass(String codebase, String name, ClassLoader defaultLoader) throws MalformedURLException, ClassNotFoundException
defaultLoader
,
if specified, before attempting to resolve the class from the
codebase URL path.
An implementation of this method must either return a class with the given name or throw an exception.
codebase
- the list of URLs (separated by spaces) to load
the class from, or null
name
- the name of the class to loaddefaultLoader
- additional contextual class loader
to use, or null
Class
object representing the loaded classMalformedURLException
- if codebase
is
non-null
and contains an invalid URL, or
if codebase
is null
and a provider-specific
URL used to load classes is invalidClassNotFoundException
- if a definition for the class
could not be found at the specified locationpublic abstract Class loadProxyClass(String codebase, String[] interfaces, ClassLoader defaultLoader) throws MalformedURLException, ClassNotFoundException
An implementation of this method must either return a proxy class that implements the named interfaces or throw an exception.
codebase
- the list of URLs (space-separated) to load
classes from, or null
interfaces
- the names of the interfaces for the proxy class
to implementdefaultLoader
- additional contextual class loader
to use, or null
MalformedURLException
- if codebase
is
non-null
and contains an invalid URL, or
if codebase
is null
and a provider-specific
URL used to load classes is invalidClassNotFoundException
- if a definition for one of
the named interfaces could not be found at the specified location,
or if creation of the dynamic proxy class failed (such as if
{@link java.lang.reflect.Proxy#getProxyClass(ClassLoader,Class[])}
would throw an IllegalArgumentException
for the given
interface list)
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |