APIdia Launch Partner
Top Description Fields Constructors Methods
java.security

public final Class AccessControlContext

extends Object
Class Inheritance
Annotations
@Deprecated
since:17
forRemoval:true
Imports
java.util.ArrayList, .List

Deprecated

for removal since 17.

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.
Author
Roland Schemers
Since
1.2

Field Summary

Modifier and TypeField and Description
private DomainCombiner
combiner

References Deprecated DomainCombiner is deprecated or references (maybe indirectly) at least one deprecated element.
private ProtectionDomain[]

Constructor Summary

AccessConstructor and Description
public
AccessControlContext(ProtectionDomain[]
the ProtectionDomain objects associated with this context. The non-duplicate domains are copied from the array. Subsequent changes to the array will not affect this AccessControlContext.
context
)

Create an AccessControlContext with the given array of ProtectionDomain objects.

public
AccessControlContext(AccessControlContext
the AccessControlContext associated with the provided DomainCombiner.
acc
,
DomainCombiner
the DomainCombiner to be associated with the provided AccessControlContext.
combiner
)
References Deprecated AccessControlContext and DomainCombiner are deprecated or reference (maybe indirectly) at least one deprecated element.

Create a new AccessControlContext with the given AccessControlContext and DomainCombiner.

Method Summary

Modifier and TypeMethod and Description
public void
checkPermission(Permission
ignored
perm
)

Throws AccessControlException.

private static boolean
containsAllPDs(ProtectionDomain[] thisContext, ProtectionDomain[] thatContext)

private boolean
equalContext(AccessControlContext that)
References Deprecated AccessControlContext is deprecated or references (maybe indirectly) at least one deprecated element.

private boolean
public boolean

Returns:

true if obj is an AccessControlContext, and has the same set of ProtectionDomain objects as this context, false otherwise.
equals
(Object
the object we are testing for equality with this object.
obj
)

Overrides java.lang.Object.equals.

Checks two AccessControlContext objects for equality.

public DomainCombiner

Returns:

the DomainCombiner associated with this AccessControlContext, or null if there is none.
getDomainCombiner
()
References Deprecated DomainCombiner is deprecated or references (maybe indirectly) at least one deprecated element.

Get the DomainCombiner associated with this AccessControlContext.

public int

Returns:

the hash code value for this context
hashCode
()

Overrides java.lang.Object.hashCode.

Returns the hash code value for this context.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

combinerback to summary
private DomainCombiner combiner

References Deprecated

DomainCombiner is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Annotations
@SuppressWarnings:removal
contextback to summary
private ProtectionDomain[] context

Constructor Detail

AccessControlContextback to summary
public AccessControlContext(ProtectionDomain[] context)

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:ProtectionDomain[]

the ProtectionDomain objects associated with this context. The non-duplicate domains are copied from the array. Subsequent changes to the array will not affect this AccessControlContext.

Exceptions
NullPointerException:
if context is null
AccessControlContextback to summary
public AccessControlContext(AccessControlContext acc, DomainCombiner combiner)

References Deprecated

AccessControlContext and DomainCombiner are deprecated or reference (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Create a new AccessControlContext with the given AccessControlContext and DomainCombiner. This constructor associates the provided DomainCombiner with the provided AccessControlContext.

Parameters
acc:AccessControlContext

the AccessControlContext associated with the provided DomainCombiner.

combiner:DomainCombiner

the DomainCombiner to be associated with the provided AccessControlContext.

Exceptions
NullPointerException:
if the provided context is null.
Since
1.3

Method Detail

checkPermissionback to summary
public void checkPermission(Permission perm) throws AccessControlException

Throws AccessControlException.

Parameters
perm:Permission

ignored

Annotations
@SuppressWarnings:removal
Exceptions
AccessControlException:
always
containsAllPDsback to summary
private static boolean containsAllPDs(ProtectionDomain[] thisContext, ProtectionDomain[] thatContext)
equalContextback to summary
private boolean equalContext(AccessControlContext that)

References Deprecated

AccessControlContext is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

equalPDsback to summary
private boolean equalPDs(ProtectionDomain[] a, ProtectionDomain[] b)
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Checks two AccessControlContext objects for equality. Checks that obj is an AccessControlContext and has the same set of ProtectionDomain objects as this context.

Parameters
obj:Object

the object we are testing for equality with this object.

Returns:boolean

true if obj is an AccessControlContext, and has the same set of ProtectionDomain objects as this context, false otherwise.

Annotations
@Override
getDomainCombinerback to summary
public DomainCombiner getDomainCombiner()

References Deprecated

DomainCombiner is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Get the DomainCombiner associated with this AccessControlContext.

Returns:DomainCombiner

the DomainCombiner associated with this AccessControlContext, or null if there is none.

Annotations
@SuppressWarnings:removal
Since
1.3
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

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.

Returns:int

the hash code value for this context

Annotations
@Override