Skip to content

Most visited

Recently visited

navigation
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 permission)
static <T> T doPrivileged(PrivilegedExceptionAction<T> action)

Calls action.run().

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

Calls action.run().

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

Calls action.run().

static <T> T doPrivileged(PrivilegedExceptionAction<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 permission)

Parameters
permission Permission
Throws
AccessControlException

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, 
                AccessControlContext context)

Calls action.run().

Parameters
action PrivilegedAction
context AccessControlContext
Returns
T

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 (PrivilegedExceptionAction<T> action, 
                AccessControlContext context)

Calls action.run().

Parameters
action PrivilegedExceptionAction
context AccessControlContext
Returns
T
Throws
PrivilegedActionException

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
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.