Name

Class java.security.AccessController

Synopsis

The access controller is responsible for determining whether or not the current thread can execute a given operation. This decision occurs in the checkPermission( ) method and is based upon all the protection domains that are on the stack of the calling thread and the set of permissions that have been granted to those protection domains. The access controller is heavily used by the security manager to enforce a specific security policy, and it may be used by arbitrary code to enforce an application-specific security policy as well.

Class Definition

public final class java.security.AccessController
    extends java.lang.Object {

    // Class Methods
    public static void checkPermission(Permission);
    public static native Object
                  doPrivileged(PrivilegedExceptionAction);
    public static native Object
                  doPrivileged(PrivilegedAction, AccessControlContext);
    public static native Object doPrivileged(PrivilegedAction);
    public static native Object doPrivileged(
                   PrivilegedExceptionAction, AccessControlContext);
    public static AccessControlContext getContext(  );
}

See also

Permission, ProtectionDomain, Policy

Get Java Security, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.