@Beta public class RemotePolicyProvider extends AbstractPolicy implements RemotePolicy, ScalableNestedPolicy
Policy.Parameters
ALL_PERMISSION, comparator, umbrella
UNSUPPORTED_EMPTY_COLLECTION
Constructor and Description |
---|
RemotePolicyProvider(Policy basePolicy)
Creates a new
RemotePolicyProvider instance that wraps
around the given non-null base policy object. |
Modifier and Type | Method and Description |
---|---|
List<PermissionGrant> |
getPermissionGrants(ProtectionDomain domain)
Returns a new List containing immutable PermissionGrant's, the
List returned is not synchronised and must not be shared with policy
internal state.
|
PermissionCollection |
getPermissions(CodeSource codesource) |
PermissionCollection |
getPermissions(ProtectionDomain domain) |
boolean |
implies(ProtectionDomain domain,
Permission permission) |
void |
replace(PermissionGrant[] grants)
Replaces the existing RemotePolicy's PermissionGrant's.
|
checkCallerHasGrants, checkNullElements, convert, expandUmbrella, extractGrantFromPolicy, processGrants
getInstance, getInstance, getInstance, getParameters, getPolicy, getProvider, getType, refresh, setPolicy
public RemotePolicyProvider(Policy basePolicy)
RemotePolicyProvider
instance that wraps
around the given non-null
base policy object.basePolicy
- base policy object containing information about
non-dynamic grantsNullPointerException
- if basePolicy
is
null
public void replace(PermissionGrant[] grants) throws IOException
RemotePolicy
replace
in interface RemotePolicy
grants
- PermissionGrant array.IOException
- if connection problem occurs.public PermissionCollection getPermissions(CodeSource codesource)
getPermissions
in class Policy
public PermissionCollection getPermissions(ProtectionDomain domain)
getPermissions
in class Policy
public boolean implies(ProtectionDomain domain, Permission permission)
public List<PermissionGrant> getPermissionGrants(ProtectionDomain domain)
ScalableNestedPolicy
getPermissionGrants
in interface ScalableNestedPolicy
domain
- ProtectionDomain grants apply toCopyright © 2016–2018 The Apache Software Foundation. All rights reserved.