java.lang.Object
java.security.AccessControlContext
Deprecated, for removal: This API element is subject to removal in a future version.
An AccessControlContext encapsulates the information which is needed
by class AccessController to detect if a Permission would be granted
at a particular point in a programs execution.
-
Constructor Summary
ConstructorsConstructorDescriptionAccessControlContext
(AccessControlContext acc, DomainCombiner combiner) Deprecated, for removal: This API element is subject to removal in a future version.Constructs a new instance of this class given a context and a DomainCombinerAccessControlContext
(ProtectionDomain[] fromContext) Deprecated, for removal: This API element is subject to removal in a future version.Constructs a new instance of this class given an array of protection domains. -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkPermission
(Permission perm) Deprecated, for removal: This API element is subject to removal in a future version.Checks if the permissionperm
is allowed in this context.boolean
Deprecated, for removal: This API element is subject to removal in a future version.Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.Deprecated, for removal: This API element is subject to removal in a future version.Answers the DomainCombiner for the receiver.int
hashCode()
Deprecated, for removal: This API element is subject to removal in a future version.Answers an integer hash code for the receiver.
-
Constructor Details
-
AccessControlContext
Deprecated, for removal: This API element is subject to removal in a future version.Constructs a new instance of this class given an array of protection domains.- Parameters:
fromContext
- the array of ProtectionDomain- Throws:
NullPointerException
- if fromContext is null
-
AccessControlContext
Deprecated, for removal: This API element is subject to removal in a future version.Constructs a new instance of this class given a context and a DomainCombiner- Parameters:
acc
- the AccessControlContextcombiner
- the DomainCombiner- Throws:
AccessControlException
- thrown when the caller doesn't have the "createAccessControlContext" SecurityPermissionNullPointerException
- if the provided context is null.
-
-
Method Details
-
checkPermission
Deprecated, for removal: This API element is subject to removal in a future version.Checks if the permissionperm
is allowed in this context. All ProtectionDomains must grant the permission for it to be granted.- Parameters:
perm
- java.security.Permission the permission to check- Throws:
AccessControlException
- thrown when perm is not granted.NullPointerException
- if perm is null
-
equals
Deprecated, for removal: This API element is subject to removal in a future version.Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison. In this case, they must both be AccessControlContexts and contain the same protection domains. -
hashCode
public int hashCode()Deprecated, for removal: This API element is subject to removal in a future version.Answers an integer hash code for the receiver. Any two objects which answertrue
when passed toequals
must answer the same value for this method. -
getDomainCombiner
Deprecated, for removal: This API element is subject to removal in a future version.Answers the DomainCombiner for the receiver.- Returns:
- the DomainCombiner or null
- Throws:
AccessControlException
- thrown when the caller doesn't have the "getDomainCombiner" SecurityPermission
-