Inside Java™ 2 Platform Security: Architecture, API Design, and Implementation, Second Edition
by Li Gong, Gary Ellison, Mary Dageforde
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access