java.security.AccessControlContext Class Reference

List of all members.


Detailed Description

The vm vendor may choose to implement this class.

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


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Parameters:
perm java.security.Permission the permission to check
Exceptions:
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.

Parameters:
o the object to compare with this object
Returns:
true if the object is the same as this object false if it is different from this object
See also:
hashCode

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.

Returns:
the receiver's hash
See also:
equals

DomainCombiner java.security.AccessControlContext.getDomainCombiner (  ) 

Answers the DomainCombiner for the receiver.


Member Data Documentation

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")


The documentation for this class was generated from the following file:

Genereated on Tue Dec 9 14:09:48 2008 by Doxygen.

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.