public abstract class PolicySpi extends Object
If there is any class that wants to provide a Policy implementation, all abstract methods in this SPI should be implemented.
The detailed implementations should offer a public constructor, in which a Policy.Paramters implementation acts as an input parameter.If the Policy.Paramters input cannot by understood by the constructor, an IllegalArgumentException will be thrown.
| Constructor and Description |
|---|
PolicySpi() |
| Modifier and Type | Method and Description |
|---|---|
protected PermissionCollection |
engineGetPermissions(CodeSource codesource)
Answers a PermissionCollection object containing the set of permissions
granted to the specified CodeSource.
|
protected PermissionCollection |
engineGetPermissions(ProtectionDomain domain)
Answers a PermissionCollection object containing the set of permissions
granted to the specified ProtectionDomain.
|
protected abstract boolean |
engineImplies(ProtectionDomain domain,
Permission permission)
Answers if the policy has granted a Permission to a
ProtectionDomain.
|
protected void |
engineRefresh()
Refreshes/reloads the policy configuration.
|
protected abstract boolean engineImplies(ProtectionDomain domain, Permission permission)
domain - -
the domain to check.permission - -
check whether this permission is granted to the specified
domain.protected void engineRefresh()
protected PermissionCollection engineGetPermissions(CodeSource codesource)
codesource - -
the CodeSource to which the returned PermissionCollection has
been granted.protected PermissionCollection engineGetPermissions(ProtectionDomain domain)
domain - -
the ProtectionDomain to which the returned
PermissionCollection has been granted.