java.security
Class AccessControlContext
java.lang.Object
|
+--java.security.AccessControlContext
public final class
AccessControlContextextends
ObjectAccessControlContext makes system resource access decsion
based on permission rights.
It is used for a specific context and has only one method
checkPermission. It is similar to AccessController except
that it makes decsions based on the current context instead
of the the current thread.
It is created by call AccessController.getContext method.
Since:Author:AccessControlContext
public AccessControlContext(java.security.AccessControlContext acc, java.security.DomainCombiner combiner)
Construct a new AccessControlContext with the specified
ProtectionDomains and DomainCombiner
Since:Parameters:
AccessControlContext
public AccessControlContext(java.security.ProtectionDomain )
Construct a new AccessControlContext with the specified
ProtectionDomains. context
must not be
null and duplicates will be removed.
Parameters:
checkPermission
public void checkPermission(java.security.Permission perm)
Determines whether or not the specific permission is granted
depending on the context it is within.
Parameters:
Throws:
equals
public boolean equals(java.lang.Object obj)
Checks if two AccessControlContexts are equal.
It first checks if obj is an AccessControlContext class, and
then checks if each ProtectionDomain matches.
Parameters:
Returns:
- true if equal, false otherwise
getDomainCombiner
public DomainCombiner getDomainCombiner()
Returns the Domain Combiner associated with the AccessControlContext
hashCode
public int hashCode()
Computes a hash code of this class
Returns:
- a hash code representing this class