The largest Interview Solution Library on the web


java tutorials/
« Previous | 1 | 2 | 3 | Next »

Example of Guard on Protected Resource


. . .
/*
Check to see if the calling
code is authorized.
If not, a SecurityException
(AccessControlException) will be
thrown
*/
AccessController.checkPermission(
new RuntimePermission("queuePrintJob"));
// Trusted code starts here.
. . .
« Previous | 1 | 2 | 3 | Next »


copyright © 2014 - all rights riserved by javatechnologycenter.com