Class AccessControlContext
java.lang.Object
java.security.AccessControlContext
@Deprecated(since="17", forRemoval=true) public final class AccessControlContext extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
This class was only useful in conjunction with the the Security Manager, which is no longer supported. There is no replacement for the Security Manager or this class.
AccessControlContext was used with the Security Manager for access control decisions based on context that it encapsulated. This feature no longer exists.- Since:
- 1.2
Constructor Summary
| Constructor | Description |
|---|---|
AccessControlContext |
Deprecated, for removal: This API element is subject to removal in a future version. Create a new AccessControlContext with the given AccessControlContext and DomainCombiner. |
AccessControlContext |
Deprecated, for removal: This API element is subject to removal in a future version. Create an AccessControlContext with the given array of ProtectionDomain objects. |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
void |
checkPermission |
Deprecated, for removal: This API element is subject to removal in a future version. Throws AccessControlException. |
boolean |
equals |
Deprecated, for removal: This API element is subject to removal in a future version. Checks two AccessControlContext objects for equality. |
DomainCombiner |
getDomainCombiner() |
Deprecated, for removal: This API element is subject to removal in a future version. Get the DomainCombiner associated with this AccessControlContext. |
int |
hashCode() |
Deprecated, for removal: This API element is subject to removal in a future version. Returns the hash code value for this context. |
Methods declared in class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait | Modifier and Type | Method | Description |
|---|---|---|
protected Object |
clone() |
Creates and returns a copy of this object. |
protected void |
finalize() |
Deprecated, for removal: This API element is subject to removal in a future version. Finalization is deprecated and subject to removal in a future release. |
final Class |
getClass() |
Returns the runtime class of this Object. |
final void |
notify() |
Wakes up a single thread that is waiting on this object's monitor. |
final void |
notifyAll() |
Wakes up all threads that are waiting on this object's monitor. |
String |
toString() |
Returns a string representation of the object. |
final void |
wait() |
Causes the current thread to wait until it is awakened, typically by being notified or interrupted. |
final void |
wait |
Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed. |
final void |
wait |
Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed. |
Constructor Details
AccessControlContext
public AccessControlContext(ProtectionDomain[] context)
Deprecated, for removal: This API element is subject to removal in a future version.
Create an
AccessControlContext with the given array of ProtectionDomain objects. Context must not be null. Duplicate domains will be removed from the context.- Parameters:
-
context- theProtectionDomainobjects associated with this context. The non-duplicate domains are copied from the array. Subsequent changes to the array will not affect thisAccessControlContext. - Throws:
-
NullPointerException- ifcontextisnull
AccessControlContext
public AccessControlContext(AccessControlContext acc, DomainCombiner combiner)
Deprecated, for removal: This API element is subject to removal in a future version.
Create a new
AccessControlContext with the given AccessControlContext and DomainCombiner. This constructor associates the provided DomainCombiner with the provided AccessControlContext.- Parameters:
-
acc- theAccessControlContextassociated with the providedDomainCombiner. -
combiner- theDomainCombinerto be associated with the providedAccessControlContext. - Throws:
-
NullPointerException- if the providedcontextisnull. - Since:
- 1.3
Method Details
getDomainCombiner
public DomainCombiner getDomainCombiner()
Deprecated, for removal: This API element is subject to removal in a future version.
Get the
DomainCombiner associated with this AccessControlContext.- Returns:
- the
DomainCombinerassociated with thisAccessControlContext, ornullif there is none. - Since:
- 1.3
checkPermission
public void checkPermission(Permission perm) throws AccessControlException
Deprecated, for removal: This API element is subject to removal in a future version.
Throws
AccessControlException.- Parameters:
-
perm- ignored - Throws:
-
AccessControlException- always
equals
public boolean equals(Object obj)
Deprecated, for removal: This API element is subject to removal in a future version.
Checks two
AccessControlContext objects for equality. Checks that obj is an AccessControlContext and has the same set of ProtectionDomain objects as this context.hashCode
public int hashCode()
Deprecated, for removal: This API element is subject to removal in a future version.
Returns the hash code value for this context. The hash code is computed by exclusive or-ing the hash code of all the protection domains in the context together.
© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.