|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.security.AccessControlContext
public final class AccessControlContext
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.
| Constructor Summary | |
|---|---|
AccessControlContext(AccessControlContext acc,
DomainCombiner combiner)
Construct a new AccessControlContext with the specified ProtectionDomains and DomainCombiner. |
|
AccessControlContext(ProtectionDomain[] context)
Construct a new AccessControlContext with the specified ProtectionDomains. |
|
| Method Summary | |
|---|---|
void |
checkPermission(Permission perm)
Determines whether or not the specific permission is granted depending on the context it is within. |
boolean |
equals(Object obj)
Checks if two AccessControlContexts are equal. |
DomainCombiner |
getDomainCombiner()
Returns the Domain Combiner associated with the AccessControlContext |
int |
hashCode()
Computes a hash code of this class |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AccessControlContext(ProtectionDomain[] context)
context must not be
null and duplicates will be removed.
context - The ProtectionDomains to use
public AccessControlContext(AccessControlContext acc,
DomainCombiner combiner)
ProtectionDomains and DomainCombiner.
Code calling this constructor must have a SecurityPermission of createAccessControlContext.
SecurityException - If the caller does not have permission
to create an access control context.| Method Detail |
|---|
public DomainCombiner getDomainCombiner()
public void checkPermission(Permission perm)
throws AccessControlException
perm - a permission to check
AccessControlException - if the permssion is not permittedpublic boolean equals(Object obj)
equals in class Objectobj - The object to compare this class to
Object.hashCode()public int hashCode()
hashCode in class ObjectObject.equals(Object),
System.identityHashCode(Object)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||