public class SimplePolicyProvider extends Policy
Policy.ParametersUNSUPPORTED_EMPTY_COLLECTION| Constructor and Description |
|---|
SimplePolicyProvider()
Create a new instance of SimplePolicyProvider
delegates to existing policy provider unless one
is not defined, in which case it trys to load
default sun provider
|
| Modifier and Type | Method and Description |
|---|---|
PermissionCollection |
getPermissions(CodeSource codesource)
Evaluates the global policy 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 policy 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 policy for the permissions granted to
the ProtectionDomain and tests whether the permission is
granted.
|
void |
refresh()
Refreshes/reloads the policy configuration.
|
getInstance, getInstance, getInstance, getParameters, getPolicy, getProvider, getType, setPolicypublic SimplePolicyProvider()
public PermissionCollection getPermissions(CodeSource codesource)
getPermissions in class Policycodesource - 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 Policydomain - the ProtectionDomain associated with the caller.ProtectionDomain,
SecureClassLoaderpublic boolean implies(ProtectionDomain domain, Permission permission)
implies in class Policydomain - the ProtectionDomain to testpermission - the Permission object to be tested for implication.ProtectionDomainCopyright © 2017–2020 Eclipse Foundation. All rights reserved.