APIdia Launch Partner
Top Description Constructors Methods
java.security

public abstract Class PolicySpi

extends Object
Class Inheritance
Annotations
@Deprecated
since:17
forRemoval:true

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 class defines the Service Provider Interface (SPI) for the Policy class. Installing a system-wide Policy object is no longer supported.
Since
1.6

Constructor Summary

AccessConstructor and Description
public
PolicySpi()

Constructor.

Method Summary

Modifier and TypeMethod and Description
protected PermissionCollection

Returns:

a set of permissions granted to the specified CodeSource
engineGetPermissions
(CodeSource
the CodeSource to which the returned PermissionCollection has been granted
codesource
)

Return a PermissionCollection object containing the set of permissions granted to the specified CodeSource.

protected PermissionCollection

Returns:

a set of permissions granted to the specified ProtectionDomain
engineGetPermissions
(ProtectionDomain
the ProtectionDomain to which the returned PermissionCollection has been granted
domain
)

Return a PermissionCollection object containing the set of permissions granted to the specified ProtectionDomain.

protected abstract boolean

Returns:

boolean true if the permission is granted to the domain
engineImplies
(ProtectionDomain
the ProtectionDomain to check
domain
,
Permission
check whether this permission is granted to the specified domain
permission
)

Check whether the policy has granted a Permission to a ProtectionDomain.

protected void
engineRefresh()

Refreshes/reloads the policy configuration.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

PolicySpiback to summary
public PolicySpi()

Constructor.

Method Detail

engineGetPermissionsback to summary
protected PermissionCollection engineGetPermissions(CodeSource codesource)

Return a PermissionCollection object containing the set of permissions granted to the specified CodeSource.

The default implementation of this method returns Policy.UNSUPPORTED_EMPTY_COLLECTION object.

Parameters
codesource:CodeSource

the CodeSource to which the returned PermissionCollection has been granted

Returns:PermissionCollection

a set of permissions granted to the specified CodeSource

Annotations
@SuppressWarnings:removal
engineGetPermissionsback to summary
protected PermissionCollection engineGetPermissions(ProtectionDomain domain)

Return a PermissionCollection object containing the set of permissions granted to the specified ProtectionDomain.

The default implementation of this method returns Policy.UNSUPPORTED_EMPTY_COLLECTION object.

Parameters
domain:ProtectionDomain

the ProtectionDomain to which the returned PermissionCollection has been granted

Returns:PermissionCollection

a set of permissions granted to the specified ProtectionDomain

Annotations
@SuppressWarnings:removal
engineImpliesback to summary
protected abstract boolean engineImplies(ProtectionDomain domain, Permission permission)

Check whether the policy has granted a Permission to a ProtectionDomain.

Parameters
domain:ProtectionDomain

the ProtectionDomain to check

permission:Permission

check whether this permission is granted to the specified domain

Returns:boolean

boolean true if the permission is granted to the domain

engineRefreshback to summary
protected void engineRefresh()

Refreshes/reloads the policy configuration.

The default implementation of this method does nothing.