Microsoft SDK for Java

checkAccess

The checkAccess method of the StandardSecurityManager Class contains the following signatures:

checkAccess(Thread t)
checkAccess(ThreadGroup g)

checkAccess(Thread t)

Determines whether classes within the current execution context, based on the call stack of the current thread, are allowed to manipulate the specified thread.

Syntax

public void checkAccess(Thread t);

Parameters

t The thread whose call stack is being checked for permissions.

Remarks

The check succeeds only if all the classes found on the call stack possess ThreadPermissions, and if those permissions allow access to the specified thread. This method overrides the java.lang.SecurityManager.checkAccess method.

Exceptions

SecurityException if the security check fails.

checkAccess(ThreadGroup g)

Determines whether classes within the current execution context, based on the call stack of the current thread, are allowed to manipulate the specified thread group.

Syntax

public void checkAccess(ThreadGroup g);

Parameters

g The thread group whose call stack is being checked for permissions.

Remarks

The check succeeds only if all the classes found on the call stack possess ThreadPermissions, and if those permissions allow access to the specified thread group. This method overrides the java.lang.SecurityManager.checkAccess method.

Exceptions

SecurityException if the security check fails.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.