Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.security

Class AccessControlContext

java.lang.Object
|
+--java.security.AccessControlContext


public final class AccessControlContext

extends Object

AccessControlContext 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:

Constructor Summary

AccessControlContext(java.security.ProtectionDomain )

Construct a new AccessControlContext with the specified ProtectionDomains.
AccessControlContext(java.security.AccessControlContext acc, java.security.DomainCombiner combiner)

Construct a new AccessControlContext with the specified ProtectionDomains and DomainCombiner

Method Summary

voidcheckPermission(java.security.Permission perm)

Determines whether or not the specific permission is granted depending on the context it is within.
booleanequals(java.lang.Object obj)

Checks if two AccessControlContexts are equal.
java.security.DomainCombinergetDomainCombiner()

Returns the Domain Combiner associated with the AccessControlContext
inthashCode()

Computes a hash code of this class

Constructor Details

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:


Method Details

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:


getDomainCombiner

public DomainCombiner getDomainCombiner()

Returns the Domain Combiner associated with the AccessControlContext


hashCode

public int hashCode()

Computes a hash code of this class

Returns: