O'Reilly logo

Java Security by Scott Oaks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 native Object doPrivileged(PrivilegedAction);
	public static native Object doPrivileged(PrivilegedAction, 
                               AccessControlContext);
	public static native Object
                               doPrivileged(PrivilegedExceptionAction);
	public static native Object doPrivileged(PrivilegedExceptionAction, 
                               AccessControlContext);
	public static void checkPermission(Permission);
	public static AccessControlContext getContext();
}

See Also:

Permission, ProtectionDomain, Policy

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required