public class JDKPolicyFileWrapper extends Policy
Policy.Parameters
UNSUPPORTED_EMPTY_COLLECTION
Constructor and Description |
---|
JDKPolicyFileWrapper() |
Modifier and Type | Method and Description |
---|---|
protected Policy |
getNewPolicy()
Gets the underlying PolicyFile implementation can be overridden by Subclass
|
PermissionCollection |
getPermissions(CodeSource codesource)
Evaluates the global jdkPolicyFile and returns a PermissionCollection object specifying the set of permissions allowed for
code from the specified code source.
|
PermissionCollection |
getPermissions(ProtectionDomain domain)
Evaluates the global jdkPolicyFile and returns a PermissionCollection object specifying the set of permissions allowed given
the characteristics of the protection domain.
|
boolean |
implies(ProtectionDomain domain,
Permission permission)
Evaluates the global jdkPolicyFile for the permissions granted to the ProtectionDomain and tests whether the permission is
granted.
|
void |
refresh()
Refreshes/reloads the jdkPolicyFile configuration.
|
getInstance, getInstance, getInstance, getParameters, getPolicy, getProvider, getType, setPolicy
protected Policy getNewPolicy()
public PermissionCollection getPermissions(CodeSource codesource)
getPermissions
in class Policy
codesource
- the CodeSource associated with the caller. This encapsulates the original location of the code
(where the code came from) and the public key(s) of its signer.public PermissionCollection getPermissions(ProtectionDomain domain)
getPermissions
in class Policy
domain
- the ProtectionDomain associated with the caller.ProtectionDomain
,
SecureClassLoader
public boolean implies(ProtectionDomain domain, Permission permission)
implies
in class Policy
domain
- the ProtectionDomain to testpermission
- the Permission object to be tested for implication.ProtectionDomain
Copyright © 2019. All rights reserved.