public final class DownloadPermission extends BasicPermission
CodeSource
of a
downloaded class in order for the class to be defined using RMIClassLoader
.
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 RMIClassLoader
provider supports it; not all
RMIClassLoader
providers support this permission. In
particular, the default provider (see 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
. PreferredClassProvider
itself
does not enforce this permission, but subclasses may configure it
to do so (see RequireDlPermProvider
).
Constructor and Description |
---|
DownloadPermission()
Creates a new
DownloadPermission with the name
"permit". |
equals, getActions, hashCode, implies, newPermissionCollection
checkGuard, getName, toString
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.