|
Préférences
Moteurs de recherche
|
|||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.6.0
java.security
|
Constructor Summary | |
---|---|
AccessControlContext(AccessControlContext acc,
DomainCombiner combiner)
Create a new AccessControlContext with the given
AccessControlContext and DomainCombiner . |
|
AccessControlContext(ProtectionDomain[] context)
Create an AccessControlContext with the given set of ProtectionDomains. |
Method Summary | |
---|---|
void |
checkPermission(Permission perm)
Determines whether the access request indicated by the specified permission should be allowed or denied, based on the security policy currently in effect, and the context in this object. |
boolean |
equals(Object obj)
Checks two AccessControlContext objects for equality. |
DomainCombiner |
getDomainCombiner()
Get the DomainCombiner associated with this
AccessControlContext . |
int |
hashCode()
Returns the hash code value for this context. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AccessControlContext(ProtectionDomain[] context)
context
- the ProtectionDomains associated with this context.
The non-duplicate domains are copied from the array. Subsequent
changes to the array will not affect this AccessControlContext.public AccessControlContext(AccessControlContext acc, DomainCombiner combiner)
AccessControlContext
with the given
AccessControlContext
and DomainCombiner
.
This constructor associates the provided
DomainCombiner
with the provided
AccessControlContext
.
acc
- the AccessControlContext
associated
with the provided DomainCombiner
. combiner
- the DomainCombiner
to be associated
with the provided AccessControlContext
.
NullPointerException
- if the provided
context
is null
.
SecurityException
- if the caller does not have permission
to invoke this constructor.Method Detail |
---|
public DomainCombiner getDomainCombiner()
DomainCombiner
associated with this
AccessControlContext
.
DomainCombiner
associated with this
AccessControlContext
, or null
if there is none.
SecurityException
- if the caller does not have permission
to get the DomainCombiner
associated with this
AccessControlContext
.public void checkPermission(Permission perm) throws AccessControlException
This method quietly returns if the access request is permitted, or throws a suitable AccessControlException otherwise.
perm
- the requested permission.
AccessControlException
- if the specified permission
is not permitted, based on the current security policy and the
context encapsulated by this object.
NullPointerException
- if the permission to check for is null.public boolean equals(Object obj)
obj
- the object we are testing for equality with this object.
Object.hashCode()
,
Hashtable
public int hashCode()
Object.equals(java.lang.Object)
,
Hashtable