The reference implementation must be used if the reference implementation of AccessController is used.
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.
Public Member Functions | |
AccessControlContext (ProtectionDomain[] context) | |
Constructs a new instance of this class given an array of protection domains. | |
AccessControlContext (AccessControlContext acc, DomainCombiner combiner) | |
Constructs a new instance of this class given a context and a DomainCombiner. | |
void | checkPermission (Permission perm) throws AccessControlException |
Checks if the permission perm is allowed in this context. | |
boolean | equals (Object o) |
Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison. | |
int | hashCode () |
Answers an integer hash code for the receiver. | |
DomainCombiner | getDomainCombiner () |
Answers the DomainCombiner for the receiver. | |
Package Functions | |
AccessControlContext (ProtectionDomain[] context, boolean ignored) | |
Package Attributes | |
DomainCombiner | domainCombiner |
ProtectionDomain[] | domainsArray |
Static Private Attributes | |
static final SecurityPermission | createAccessControlContext |
static final SecurityPermission | getDomainCombiner |
java.security.AccessControlContext.AccessControlContext | ( | ProtectionDomain[] | context | ) |
Constructs a new instance of this class given an array of protection domains.
java.security.AccessControlContext.AccessControlContext | ( | AccessControlContext | acc, | |
DomainCombiner | combiner | |||
) |
Constructs a new instance of this class given a context and a DomainCombiner.
void java.security.AccessControlContext.checkPermission | ( | Permission | perm | ) | throws AccessControlException |
Checks if the permission perm
is allowed in this context.
All ProtectionDomains must grant the permission for it to be granted.
perm | java.security.Permission the permission to check |
java.security.AccessControlException | thrown when perm is not granted. |
boolean java.security.AccessControlContext.equals | ( | Object | o | ) |
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.
o | the object to compare with this object |
true
if the object is the same as this object false
if it is different from this object int java.security.AccessControlContext.hashCode | ( | ) |
Answers an integer hash code for the receiver.
Any two objects which answer true
when passed to equals
must answer the same value for this method.
DomainCombiner java.security.AccessControlContext.getDomainCombiner | ( | ) |
Answers the DomainCombiner for the receiver.
final SecurityPermission java.security.AccessControlContext.createAccessControlContext [static, private] |
Initial value:
new SecurityPermission( "createAccessControlContext")
final SecurityPermission java.security.AccessControlContext.getDomainCombiner [static, private] |
Initial value:
new SecurityPermission( "getDomainCombiner")
Genereated on Tue Dec 9 14:09:48 2008 by Doxygen.
(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.