SecurityManager.checkAccess

SecurityManager.checkAccess

Class Overview | Class Members | This Package | All Packages

Syntax 1
public void checkAccess( Thread g )
Parameters
g
the thread to be checked.
Description
Throws a SecurityException if the calling thread is not allowed to modify the thread argument.

This method is invoked for the current security manager by the stop, suspend, resume, setPriority, setName, and setDaemon methods of class Thread.

The checkAccess method for class SecurityManager always throws a SecurityException.

Exceptions
SecurityException if the caller does not have permission to modify the thread.
See Also
getSecurityManager, resume, setDaemon, setName, setPriority, stop, suspend



Syntax 2
public void checkAccess( ThreadGroup g )
Parameters
g
the thread group to be checked.
Description
Throws a SecurityException if the calling thread is not allowed to modify the thread group argument.

This method is invoked for the current security manager when a new child thread or child thread group is created, and by the setDaemon, setMaxPriority, stop, suspend, resume, and destroy methods of class ThreadGroup.

The checkAccess method for class SecurityManager always throws a SecurityException.

Exceptions
SecurityException if the caller does not have permission to modify the thread group.
See Also
getSecurityManager, destroy, resume, setDaemon, setMaxPriority, stop, suspend