Perform privileged work as a particular Subject after setting subject reference in current thread.
Parameters: subject - the Subject that the specifiedaction will run as. This parametermay be null . Parameters: action - the code to be run as the specifiedSubject .
Parameters: acc - the AccessControlContext to be tied to thespecified subject and action.
the Object returned by thePrivilegedExceptionAction's run method. exception: PrivilegedActionException - if thePrivilegedExceptionAction.run method throws a checked exception. exception: NullPointerException - if the specifiedPrivilegedExceptionAction isnull .
exception: SecurityException - if the caller does not have permissionto invoke this method.
|