|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.rmi.server.RMIClassLoaderSpi net.dpml.depot.DepotRMIClassLoaderSpi
The DepotRMIClassLoaderSpi handles the loading of classes that are based on plugin artifact types.
Constructor Summary | |
DepotRMIClassLoaderSpi()
Default constructor. |
Method Summary | |
String |
getClassAnnotation(Class cl)
Provides the implementation for RMIClassLoader.getClassAnnotation(Class) . |
ClassLoader |
getClassLoader(String codebase)
Provides the implementation for RMIClassLoader.getClassLoader(String) . |
Class |
loadClass(String codebase,
String name,
ClassLoader defaultLoader)
Provides the implementation for RMIClassLoader.loadClass(URL,String) ,
RMIClassLoader.loadClass(String,String) , and
RMIClassLoader.loadClass(String,String,ClassLoader) . |
Class |
loadProxyClass(String codebase,
String[] interfaces,
ClassLoader defaultLoader)
Provides the implementation for RMIClassLoader.loadProxyClass(String,String[],ClassLoader) . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DepotRMIClassLoaderSpi()
Method Detail |
public Class loadClass(String codebase, String name, ClassLoader defaultLoader) throws MalformedURLException, ClassNotFoundException
RMIClassLoader.loadClass(URL,String)
,
RMIClassLoader.loadClass(String,String)
, and
RMIClassLoader.loadClass(String,String,ClassLoader)
.
Loads a class from a codebase URL path, optionally using the
supplied loader.
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 class
MalformedURLException
- if codebase
is
non-null
and contains an invalid URL, or
if codebase
is null
and the system
property java.rmi.server.codebase
contains an
invalid URL
ClassNotFoundException
- if a definition for the class
could not be found at the specified locationpublic Class loadProxyClass(String codebase, String[] interfaces, ClassLoader defaultLoader) throws MalformedURLException, ClassNotFoundException
RMIClassLoader.loadProxyClass(String,String[],ClassLoader)
.
Loads a dynamic proxy class (see 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.
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 the system
property java.rmi.server.codebase
contains an
invalid URL
ClassNotFoundException
- 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
Proxy.getProxyClass(ClassLoader,Class[])
would throw an IllegalArgumentException
for the given
interface list)public ClassLoader getClassLoader(String codebase) throws MalformedURLException, SecurityException
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.
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 the system
property java.rmi.server.codebase
contains an
invalid URL
SecurityException
- if there is a security manager and the
invocation of its checkPermission
method fails, or
if the caller does not have permission to connect to all of the
URLs in the codebase URL pathpublic String getClassAnnotation(Class cl) throws NullPointerException
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.
cl
- the class to obtain the annotation for
null
NullPointerException
- if cl
is null
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |