RMIClassLoaderSpipublic 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 :
- {@link RMIClassLoader#loadClass(URL,String)}
- {@link RMIClassLoader#loadClass(String,String)}
- {@link RMIClassLoader#loadClass(String,String,ClassLoader)}
- {@link RMIClassLoader#loadProxyClass(String,String[],ClassLoader)}
- {@link RMIClassLoader#getClassLoader(String)}
- {@link RMIClassLoader#getClassAnnotation(Class)}
When one of those methods is invoked, its behavior is to delegate
to a corresponding method on an instance of this class.
The details of how each method delegates to the provider instance is
described in the documentation for each particular method.
See the documentation for {@link RMIClassLoader} for a description
of how a provider instance is chosen. |
Methods Summary |
---|
public abstract java.lang.String | getClassAnnotation(java.lang.Class cl)Provides the implementation for
{@link RMIClassLoader#getClassAnnotation(Class)}.
Returns the annotation string (representing a location for
the class definition) that RMI will use to annotate the class
descriptor when marshalling objects of the given class.
| public abstract java.lang.ClassLoader | getClassLoader(java.lang.String codebase)Provides the implementation for
{@link RMIClassLoader#getClassLoader(String)}.
Returns a class loader that loads classes from the given codebase
URL path.
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.
| public abstract java.lang.Class | loadClass(java.lang.String codebase, java.lang.String name, java.lang.ClassLoader defaultLoader)Provides the implementation for
{@link RMIClassLoader#loadClass(URL,String)},
{@link RMIClassLoader#loadClass(String,String)}, and
{@link RMIClassLoader#loadClass(String,String,ClassLoader)}.
Loads a class from a codebase URL path, optionally using the
supplied loader.
Typically, a provider implementation will attempt to
resolve the named class using the given 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.
| public abstract java.lang.Class | loadProxyClass(java.lang.String codebase, java.lang.String[] interfaces, java.lang.ClassLoader defaultLoader)Provides the implementation for
{@link RMIClassLoader#loadProxyClass(String,String[],ClassLoader)}.
Loads a dynamic proxy class (see {@link java.lang.reflect.Proxy}
that implements a set of interfaces with the given names
from a codebase URL path, optionally using the supplied loader.
An implementation of this method must either return a proxy
class that implements the named interfaces or throw an exception.
|
|