|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.jini.loader.ClassLoading
Provides static methods for loading classes using RMIClassLoader with optional verification that the codebase URLs
used to load classes provide content integrity (see Security.verifyCodebaseIntegrity).
| Method Summary | |
static Class |
loadClass(String codebase,
String name,
ClassLoader defaultLoader,
boolean verifyCodebaseIntegrity,
ClassLoader verifierLoader)
Loads a class using RMIClassLoader.loadClass, optionally verifying that the
codebase URLs provide content integrity.
|
static Class |
loadProxyClass(String codebase,
String[] interfaceNames,
ClassLoader defaultLoader,
boolean verifyCodebaseIntegrity,
ClassLoader verifierLoader)
Loads a dynamic proxy class using RMIClassLoader.loadProxyClass, optionally verifying that the
codebase URLs provide content integrity.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static Class loadClass(String codebase,
String name,
ClassLoader defaultLoader,
boolean verifyCodebaseIntegrity,
ClassLoader verifierLoader)
throws MalformedURLException,
ClassNotFoundException
RMIClassLoader.loadClass, optionally verifying that the
codebase URLs provide content integrity.
This method invokes RMIClassLoader.loadClass with codebase as the
first argument, name as the second argument, and
defaultLoader as the third argument. If
RMIClassLoader.loadClass throws an exception, then
this method throws that exception.
If verifyCodebaseIntegrity is true
and codebase is not null, then the
following verification procedure is performed (this procedure
may be skipped if a previous invocation of this method or
loadProxyClass has already invoked
Security.verifyCodebaseIntegrity with the same
value of codebase and the same effective value of
verifierLoader as arguments without it throwing an
exception):
If the defining class loader of theClassreturned byRMIClassLoader.loadClassis not an ancestor of or identical todefaultLoaderor the current thread's context class loader, then before causing theClassto be initialized, this method invokesSecurity.verifyCodebaseIntegritywithcodebaseas the first argument andverifierLoaderas the second argument. IfSecurity.verifyCodebaseIntegritythrows aSecurityException, then this method throws aClassNotFoundExceptioncontaining theSecurityExceptionas its cause.
If no exception is thrown, then this method returns the
Class returned by
RMIClassLoader.loadClass.
codebase - the list of URLs (separated by spaces) to load
the class from, or nullname - the name of the class to loaddefaultLoader - the class loader value (possibly
null) to pass as the defaultLoader
argument to RMIClassLoader.loadClassverifyCodebaseIntegrity - if true, verify
that codebase URLs used to load the class provide content
integrityverifierLoader - the class loader value (possibly
null) to pass to
Security.verifyCodebaseIntegrity, if
verifyCodebaseIntegrity is true
Class object representing the loaded
class
MalformedURLException - if
RMIClassLoader.loadClass or
Security.verifyCodebaseIntegrity throws a
MalformedURLException
ClassNotFoundException - if
RMIClassLoader.loadClass throws a
ClassNotFoundException or if
Security.verifyCodebaseIntegrity throws a
SecurityException
NullPointerException - if name is
null
public static Class loadProxyClass(String codebase,
String[] interfaceNames,
ClassLoader defaultLoader,
boolean verifyCodebaseIntegrity,
ClassLoader verifierLoader)
throws MalformedURLException,
ClassNotFoundException
RMIClassLoader.loadProxyClass, optionally verifying that the
codebase URLs provide content integrity.
This method invokes RMIClassLoader.loadProxyClass with codebase as
the first argument, interfaceNames as the second
argument, and defaultLoader as the third argument.
If RMIClassLoader.loadProxyClass throws an
exception, then this method throws that exception.
If verifyCodebaseIntegrity is true
and codebase is not null, then the
following verification procedure is performed (this procedure
may be skipped if a previous invocation of this method or
loadClass has already invoked
Security.verifyCodebaseIntegrity with the same
value of codebase and the same effective value of
verifierLoader as arguments without it throwing an
exception):
If the defining class loader of any of the direct superinterfaces of the proxy class returned byRMIClassLoader.loadProxyClassis not an ancestor of or identical todefaultLoaderor the current thread's context class loader, then before causing any such interface to be initialized, this method invokesSecurity.verifyCodebaseIntegritywithcodebaseas the first argument andverifierLoaderas the second argument. IfSecurity.verifyCodebaseIntegritythrows aSecurityException, then this method throws aClassNotFoundExceptioncontaining theSecurityExceptionas its cause.
If no exception is thrown, then this method returns the
Class returned by
RMIClassLoader.loadProxyClass.
codebase - the list of URLs (separated by spaces) to load
classes from, or nullinterfaceNames - the names of the interfaces for the proxy
class to implementdefaultLoader - the class loader value (possibly
null) to pass as the defaultLoader
argument to RMIClassLoader.loadProxyClassverifyCodebaseIntegrity - if true, verify
that codebase URLs used to load the interfaces provide content
integrityverifierLoader - the class loader value (possibly
null) to pass to
Security.verifyCodebaseIntegrity, if
verifyCodebaseIntegrity is true
Class object representing the loaded
dynamic proxy class
MalformedURLException - if
RMIClassLoader.loadProxyClass or
Security.verifyCodebaseIntegrity throws a
MalformedURLException
ClassNotFoundException - if
RMIClassLoader.loadProxyClass throws a
ClassNotFoundException or if
Security.verifyCodebaseIntegrity throws a
SecurityException
NullPointerException - if interfaceNames is
null or if any element of
interfaceNames is null
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||