Most visited

Recently visited

Added in API level 1

AccessController

public final class AccessController
extends Object

java.lang.Object
   ↳ java.security.AccessController


Legacy security code; do not use.

Summary

Public methods

static void checkPermission(Permission perm)
static <T> T doPrivileged(PrivilegedExceptionAction<T> action, AccessControlContext context)

Calls action.run().

static <T> T doPrivileged(PrivilegedExceptionAction<T> action)

Calls action.run().

static <T> T doPrivileged(PrivilegedAction<T> action)

Calls action.run().

static <T> T doPrivileged(PrivilegedAction<T> action, AccessControlContext context)

Calls action.run().

static <T> T doPrivilegedWithCombiner(PrivilegedAction<T> action)

Calls action.run().

static <T> T doPrivilegedWithCombiner(PrivilegedExceptionAction<T> action)

Calls action.run().

static AccessControlContext getContext()

Inherited methods

From class java.lang.Object

Public methods

checkPermission

Added in API level 1
void checkPermission (Permission perm)

Parameters
perm Permission
Throws
AccessControlException

doPrivileged

Added in API level 1
T doPrivileged (PrivilegedExceptionAction<T> action, 
                AccessControlContext context)

Calls action.run().

Parameters
action PrivilegedExceptionAction
context AccessControlContext
Returns
T
Throws
PrivilegedActionException

doPrivileged

Added in API level 1
T doPrivileged (PrivilegedExceptionAction<T> action)

Calls action.run().

Parameters
action PrivilegedExceptionAction
Returns
T
Throws
PrivilegedActionException

doPrivileged

Added in API level 1
T doPrivileged (PrivilegedAction<T> action)

Calls action.run().

Parameters
action PrivilegedAction
Returns
T

doPrivileged

Added in API level 1
T doPrivileged (PrivilegedAction<T> action, 
                AccessControlContext context)

Calls action.run().

Parameters
action PrivilegedAction
context AccessControlContext
Returns
T

doPrivilegedWithCombiner

Added in API level 9
T doPrivilegedWithCombiner (PrivilegedAction<T> action)

Calls action.run().

Parameters
action PrivilegedAction
Returns
T

doPrivilegedWithCombiner

Added in API level 9
T doPrivilegedWithCombiner (PrivilegedExceptionAction<T> action)

Calls action.run().

Parameters
action PrivilegedExceptionAction
Returns
T
Throws
PrivilegedActionException

getContext

Added in API level 1
AccessControlContext getContext ()

Returns
AccessControlContext

Hooray!