public final class AccessController
extends Object
java.lang.Object | |
↳ | java.security.AccessController |
旧版安全代码; 不使用。
Public methods |
|
---|---|
static void |
checkPermission(Permission perm) |
static <T> T |
doPrivileged(PrivilegedExceptionAction<T> action, AccessControlContext context) 致电 |
static <T> T |
doPrivileged(PrivilegedExceptionAction<T> action) 致电 |
static <T> T |
doPrivileged(PrivilegedAction<T> action) 致电 |
static <T> T |
doPrivileged(PrivilegedAction<T> action, AccessControlContext context) 致电 |
static <T> T |
doPrivilegedWithCombiner(PrivilegedAction<T> action) 致电 |
static <T> T |
doPrivilegedWithCombiner(PrivilegedExceptionAction<T> action) 致电 |
static AccessControlContext |
getContext() |
Inherited methods |
|
---|---|
From class java.lang.Object
|
void checkPermission (Permission perm)
Parameters | |
---|---|
perm |
Permission
|
Throws | |
---|---|
AccessControlException |
T doPrivileged (PrivilegedExceptionAction<T> action, AccessControlContext context)
致电 action.run()
。
Parameters | |
---|---|
action |
PrivilegedExceptionAction
|
context |
AccessControlContext
|
Returns | |
---|---|
T |
Throws | |
---|---|
PrivilegedActionException |
T doPrivileged (PrivilegedExceptionAction<T> action)
致电 action.run()
。
Parameters | |
---|---|
action |
PrivilegedExceptionAction
|
Returns | |
---|---|
T |
Throws | |
---|---|
PrivilegedActionException |
T doPrivileged (PrivilegedAction<T> action)
致电 action.run()
。
Parameters | |
---|---|
action |
PrivilegedAction
|
Returns | |
---|---|
T |
T doPrivileged (PrivilegedAction<T> action, AccessControlContext context)
致电 action.run()
。
Parameters | |
---|---|
action |
PrivilegedAction
|
context |
AccessControlContext
|
Returns | |
---|---|
T |
T doPrivilegedWithCombiner (PrivilegedAction<T> action)
致电 action.run()
。
Parameters | |
---|---|
action |
PrivilegedAction
|
Returns | |
---|---|
T |
T doPrivilegedWithCombiner (PrivilegedExceptionAction<T> action)
致电 action.run()
。
Parameters | |
---|---|
action |
PrivilegedExceptionAction
|
Returns | |
---|---|
T |
Throws | |
---|---|
PrivilegedActionException |