A DownloadPermission contains a name (also referred to as a "target name") but no action list; you either have the named permission or you don't. The only defined target name is "permit", which allows a downloaded class with a CodeSource that is granted the permission to be defined by a class loader created by RMIClassLoader.
Selective granting of this permission can be used to restrict the CodeSource values (codebase URLs and signers) from which downloaded classes can be defined using RMIClassLoader.
Note that this permission is only enforced if the current {@link RMIClassLoader} provider supports it; not allRMIClassLoader providers support this permission. In particular, the default provider (see {@link RMIClassLoader#getDefaultProviderInstance RMIClassLoader.getDefaultProviderInstance}) does not support this permission, and so when the default provider is used, downloaded classes do not need to be granted DownloadPermission in order to be defined using RMIClassLoader. {@link PreferredClassProvider} itselfdoes not enforce this permission, but subclasses may configure it to do so (see {@link RequireDlPermProvider}).
@author Sun Microsystems, Inc.
@since 2.0
| |
| |