A computation to be performed with privileges enabled. The computation is performed by invoking AccessController.doPrivileged on the PrivilegedAction object. This interface is used only for computations that do not throw checked exceptions; computations that throw checked exception
| 40 | */ |
| 41 | |
| 42 | public interface PrivilegedAction<T> { |
| 43 | /** |
| 44 | * Performs the computation. This method will be called by |
| 45 | * {@code AccessController.doPrivileged} after enabling privileges. |
| 46 | * |
| 47 | * @return a class-dependent value that may represent the results of the |
| 48 | * computation. Each class that implements |
| 49 | * {@code PrivilegedAction} |
| 50 | * should document what (if anything) this value represents. |
| 51 | * @see AccessController#doPrivileged(PrivilegedAction) |
| 52 | * @see AccessController#doPrivileged(PrivilegedAction, |
| 53 | * AccessControlContext) |
| 54 | */ |
| 55 | T run(); |
| 56 | } |
no outgoing calls
no test coverage detected