AccessControlContext


AccessControlContext java.security

Java 1.2

This class encapsulates the state of a call stack. The checkPermission( ) method can make access-control decisions based on the saved state of the call stack. Access-control checks are usually performed by the AccessController.checkPermission( ) method, which checks that the current call stack has the required permissions. Sometimes, however, it is necessary to make access-control decisions based on a previous state of the call stack. Call AccessController.getContext( ) to create an AccessControlContext for a particular call stack. In Java 1.3, this class has constructors that specify a custom context in the form of an array of ProtectionDomain objects and that associate a DomainCombiner object with an existing AccessControlContext . This class is used only by system-level code; typical applications rarely need to use it.

 public final class  AccessControlContext  {  // Public Constructors  public  AccessControlContext  (ProtectionDomain[ ]  context  );  1.3  public  AccessControlContext  (AccessControlContext  acc  , DomainCombiner  combiner  );  // Public Instance Methods  public void  checkPermission  (Permission  perm  ) throws AccessControlException;  1.3  public DomainCombiner  getDomainCombiner  ( );  // Public Methods Overriding Object  public boolean  equals  (Object  obj  );        public int  hashCode  ( );   } 

Passed To

AccessController.doPrivileged( ) , javax.security.auth.Subject.{doAsPrivileged( ) , getSubject( )}

Returned By

AccessController.getContext( )



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net