Deprecated
for removal since 17.
This class was only useful in conjunction with
the Security Manager, which is no longer
supported. Installing a system-wide Policy object is no longer
supported. The setPolicy method has been
changed to always throw UnsupportedOperationException. The
getPolicy method has been changed to always
return a Policy object that grants no permissions. There is no
replacement for the Security Manager or this class.
Policy object was responsible for determining whether code
executing in the Java runtime environment had permission to perform a
security-sensitive operation. This feature no longer exists.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | Policy.
Deprecated
for removal since 17. This class was only useful in conjunction with
the Security Manager, which is
no longer supported. There is no replacement for the Security
Manager or this class.
This represents a marker interface for Policy parameters.
|
| private static class | Policy.
References Deprecated
This subclass is returned by the getInstance calls.
Policy is deprecated or references (maybe indirectly) at least one deprecated element.
|
| private static class | Policy.
This class represents a read-only empty PermissionCollection object that
is returned from the |
| Modifier and Type | Field and Description |
|---|---|
| private static Policy | NO_PERMISSIONS_POLICY
References Deprecated
Policy is deprecated or references (maybe indirectly) at least one deprecated element.
|
| public static final PermissionCollection | UNSUPPORTED_EMPTY_COLLECTION
A read-only empty PermissionCollection instance. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static Policy | Returns: the newPolicy objectthe specified Policy type type, Policy.parameters for the paramsPolicy, which may be
null.
References Deprecated
Policy.Parameters and Policy are deprecated or reference (maybe indirectly) at least one deprecated element.
Returns a Policy object of the specified type. |
| public static Policy | Returns: the newPolicy objectthe specified Policy type type, Policy.parameters for the params,Policy, which may be
null.the provider. provider)
References Deprecated
Policy.Parameters and Policy are deprecated or reference (maybe indirectly) at least one deprecated element.
Returns a |
| public static Policy | Returns: the newPolicy objectthe specified Policy type type, Policy.parameters for the params,Policy, which may be
null.the provider)Provider.
References Deprecated
Policy.Parameters and Policy are deprecated or reference (maybe indirectly) at least one deprecated element.
Returns a |
| public Policy. | Returns: Policy parameters, or null.
References Deprecated
Policy.Parameters is deprecated or references (maybe indirectly) at least one deprecated element.
Return |
| public PermissionCollection | Returns: a set of permissions granted to the specified CodeSource. If this operation is supported, the returned set of permissions must be a new mutable instance and it must support heterogeneous Permission types. If this operation is not supported, Policy.UNSUPPORTED_EMPTY_COLLECTION is returned.ignored codesource)Return a PermissionCollection object containing the set of permissions granted to the specified CodeSource. |
| public PermissionCollection | Returns: a set of permissions granted to the specified ProtectionDomain. If this operation is supported, the returned set of permissions must be a new mutable instance and it must support heterogeneous Permission types. If this operation is not supported, Policy.UNSUPPORTED_EMPTY_COLLECTION is returned.ignored domain)Return a PermissionCollection object containing the set of permissions granted to the specified ProtectionDomain. |
| public static Policy | |
| public Provider | |
| public String | |
| private static Policy | handleException(NoSuchAlgorithmException nsae)
References Deprecated
Policy is deprecated or references (maybe indirectly) at least one deprecated element.
|
| public boolean | Returns: false alwaysignored domain, Permission ignored permission)Evaluates the permissions granted to the ProtectionDomain and tests whether the permission is granted. |
| public void | |
| public static void |
| NO_PERMISSIONS_POLICY | back to summary |
|---|---|
| private static Policy NO_PERMISSIONS_POLICY
References Deprecated
See corresponding docs for further information. | |
| UNSUPPORTED_EMPTY_COLLECTION | back to summary |
|---|---|
| public static final PermissionCollection UNSUPPORTED_EMPTY_COLLECTION A read-only empty PermissionCollection instance.
| |
| Policy | back to summary |
|---|---|
| public Policy() Constructor for subclasses to call. | |
| getInstance | back to summary |
|---|---|
| public static Policy getInstance(String type, Policy. References Deprecated
See corresponding docs for further information. Returns a Policy object of the specified type. This method traverses the list of registered security providers,
starting with the most preferred provider.
A new Note that the list of registered providers may be retrieved via
the Implementation Note The JDK Reference Implementation additionally uses the
| |
| getInstance | back to summary |
|---|---|
| public static Policy getInstance(String type, Policy. References Deprecated
See corresponding docs for further information. Returns a A new Note that the list of registered providers may be retrieved via
the
| |
| getInstance | back to summary |
|---|---|
| public static Policy getInstance(String type, Policy. References Deprecated
See corresponding docs for further information. Returns a A new
| |
| getParameters | back to summary |
|---|---|
| public Policy. References Deprecated
See corresponding docs for further information. Return This
| |
| getPermissions | back to summary |
|---|---|
| public PermissionCollection getPermissions(CodeSource codesource) Return a PermissionCollection object containing the set of permissions granted to the specified CodeSource. The default implementation of this method ignores the CodeSource and returns Policy.UNSUPPORTED_EMPTY_COLLECTION.
| |
| getPermissions | back to summary |
|---|---|
| public PermissionCollection getPermissions(ProtectionDomain domain) Return a PermissionCollection object containing the set of permissions granted to the specified ProtectionDomain. The default implementation of this method ignores the ProtectionDomain and returns Policy.UNSUPPORTED_EMPTY_COLLECTION.
| |
| getPolicy | back to summary |
|---|---|
| public static Policy getPolicy()
References Deprecated
See corresponding docs for further information. Returns a
API Note This method originally returned the installed
| |
| getProvider | back to summary |
|---|---|
| public Provider getProvider() Return the This
| |
| getType | back to summary |
|---|---|
| public String getType() Return the type of this This
| |
| handleException | back to summary |
|---|---|
| private static Policy handleException(NoSuchAlgorithmException nsae) throws NoSuchAlgorithmException
References Deprecated
See corresponding docs for further information. | |
| implies | back to summary |
|---|---|
| public boolean implies(ProtectionDomain domain, Permission permission) Evaluates the permissions granted to the ProtectionDomain and tests whether the permission is granted. The default implementation of this method ignores the ProtectionDomain and Permission parameters and always returns false.
| |
| refresh | back to summary |
|---|---|
| public void refresh() Refreshes/reloads the policy configuration. The default implementation of this method does nothing. | |
| setPolicy | back to summary |
|---|---|
| public static void setPolicy(Policy p)
References Deprecated
See corresponding docs for further information. Throws API Note This method originally installed the system-wide
| |
Deprecated
for removal since 17.
This class was only useful in conjunction with the Security Manager, which is no longer supported. There is no replacement for the Security Manager or this class.
References Deprecated
Policy is deprecated or references (maybe indirectly) at least one deprecated element.
See corresponding docs for further information.
Policy
calls are delegated to the underlying PolicySpi.
| Modifier and Type | Field and Description |
|---|---|
| private Provider | |
| private Policy. | params
References Deprecated
Policy.Parameters is deprecated or references (maybe indirectly) at least one deprecated element.
|
| private PolicySpi | |
| private String |
| Access | Constructor and Description |
|---|---|
| private | PolicyDelegate(PolicySpi spi, Provider p, String type, Policy.
References Deprecated
PolicySpi and Policy.Parameters are deprecated or reference (maybe indirectly) at least one deprecated element.
|
| Modifier and Type | Method and Description |
|---|---|
| public Policy. | getParameters()
Overrides java.
References Deprecated
Policy.Parameters is deprecated or references (maybe indirectly) at least one deprecated element.
Return |
| public PermissionCollection | getPermissions(CodeSource codesource)
Overrides java. Return a PermissionCollection object containing the set of permissions granted to the specified CodeSource. |
| public PermissionCollection | getPermissions(ProtectionDomain domain)
Overrides java. Return a PermissionCollection object containing the set of permissions granted to the specified ProtectionDomain. |
| public Provider | |
| public String | |
| public boolean | implies(ProtectionDomain domain, Permission perm)
Overrides java. Evaluates the permissions granted to the ProtectionDomain and tests whether the permission is granted. |
| public void |
| p | back to summary |
|---|---|
| private Provider p | |
| params | back to summary |
|---|---|
| private Policy. References Deprecated
See corresponding docs for further information. | |
| spi | back to summary |
|---|---|
| private PolicySpi spi
References Deprecated
See corresponding docs for further information.
| |
| type | back to summary |
|---|---|
| private String type | |
| PolicyDelegate | back to summary |
|---|---|
| private PolicyDelegate(PolicySpi spi, Provider p, String type, Policy. References Deprecated
See corresponding docs for further information. | |
| getParameters | back to summary |
|---|---|
| public Policy. Overrides java. Doc from java. References Deprecated
See corresponding docs for further information. Return This
| |
| getPermissions | back to summary |
|---|---|
| public PermissionCollection getPermissions(CodeSource codesource) Overrides java. Doc from java. Return a PermissionCollection object containing the set of permissions granted to the specified CodeSource. The default implementation of this method ignores the CodeSource and returns Policy.UNSUPPORTED_EMPTY_COLLECTION.
| |
| getPermissions | back to summary |
|---|---|
| public PermissionCollection getPermissions(ProtectionDomain domain) Overrides java. Doc from java. Return a PermissionCollection object containing the set of permissions granted to the specified ProtectionDomain. The default implementation of this method ignores the ProtectionDomain and returns Policy.UNSUPPORTED_EMPTY_COLLECTION.
| |
| getProvider | back to summary |
|---|---|
| public Provider getProvider() Overrides java. Doc from java. Return the This
| |
| getType | back to summary |
|---|---|
| public String getType() Overrides java. Doc from java. Return the type of this This
| |
| implies | back to summary |
|---|---|
| public boolean implies(ProtectionDomain domain, Permission perm) Overrides java. Doc from java. Evaluates the permissions granted to the ProtectionDomain and tests whether the permission is granted. The default implementation of this method ignores the ProtectionDomain and Permission parameters and always returns false.
| |
| refresh | back to summary |
|---|---|
| public void refresh() Overrides java. Doc from java. Refreshes/reloads the policy configuration. The default implementation of this method does nothing.
| |
getPermissions(CodeSource) and
getPermissions(ProtectionDomain)
methods in the Policy class when those operations are not
supported by the Policy implementation.
| Modifier and Type | Field and Description |
|---|---|
| private Permissions | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | add(Permission
the Permission object to add. permission)Implements abstract java. Adds a permission object to the current collection of permission objects. |
| public Enumeration | Returns: an enumeration of all the Permissions.Implements abstract java. Returns an enumeration of all the Permission objects in the collection. |
| public boolean | Returns: true if "permission" is implied by the permissions in
the collection, false if not.the Permission object to compare. permission)Implements abstract java. Checks to see if the specified permission is implied by the collection of Permission objects held in this PermissionCollection. |
| public boolean | Returns: true if this object is marked as readonly, false otherwise.Overrides java. If this object is readonly, no new objects can be added to it using |
| perms | back to summary |
|---|---|
| private Permissions perms | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| UnsupportedEmptyCollection | back to summary |
|---|---|
| public UnsupportedEmptyCollection() Create a read-only empty PermissionCollection object. | |
| add | back to summary |
|---|---|
| public void add(Permission permission) Implements abstract java. Adds a permission object to the current collection of permission objects.
| |
| elements | back to summary |
|---|---|
| public Enumeration Implements abstract java. Returns an enumeration of all the Permission objects in the collection.
| |
| implies | back to summary |
|---|---|
| public boolean implies(Permission permission) Implements abstract java. Checks to see if the specified permission is implied by the collection of Permission objects held in this PermissionCollection.
| |
| isReadOnly | back to summary |
|---|---|
| public boolean isReadOnly() Overrides java. If this object is readonly, no new objects can be added to it using
| |