java.lang.Object
com.sun.management.Threads
Threads
is a preview API of the Java platform.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
This class consists exclusively of static methods that operate on threads for the
purposes of monitoring and management.
- Since:
- 21
-
Method Details
-
currentThreadEnclosingScopes
Returns a string that describes the current thread's enclosing scopes or an empty string if there no enclosing scopes.If there is a security manager set, and describing an enclosing scope requires getting the stack trace of its owner thread, then the security manager's
checkPermission
method is called to check the permissionRuntimePermission("getStackTrace")
.- API Note:
- There is no equivalent at this time to describe the enclosing scopes of other threads.
- Implementation Requirements:
- The default implementation includes the name, owner, and owner stack trace of each enclosing scope.
- Throws:
SecurityException
- if denied by the security manager- See Also:
-
Threads
when preview features are enabled.