O'Reilly logo

Inside Java™ 2 Platform Security: Architecture, API Design, and Implementation, Second Edition by Mary Dageforde, Gary Ellison, Li Gong

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

9.11. Guarding Objects

Apart from SignedObject, which provides object authenticity, J2SDK 1.2 introduced an interface, java.security.Guard, and a class, java.security.GuardedObject, that may be used for object-level access control. A GuardedObject is used to protect access to another object. A GuardedObject encapsulates a target object and a Guard object. Once a target object is encapsulated by a GuardedObject, access to that object is controlled by the getObject method. This method invokes the checkGuard method on the java.security.Guard object that is guarding access. If access is allowed, checkGuard returns silently; if access is not allowed, it throws a SecurityException. A GuardedObject and protection of access to the target object via ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required