6.2. AccessControlContext

An AccessControlContext is used to make system resource access decisions based on the context it encapsulates. More specifically, it encapsulates a context and has a checkPermission method that is equivalent to the checkPermission method in the AccessController class (refer to Section 6.4), with one difference: The AccessControlContext checkPermission method makes access decisions based on the context it encapsulates rather than on that of the current execution thread.

Thus, the purpose of AccessControlContext is for those situations in which a security check that should be made within a given context needs to be done from within a different context, for example, from within a worker thread.

AccessControlContext has ...

Get Inside Java™ 2 Platform Security: Architecture, API Design, and Implementation, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.