THE PACKAGE JAVA.LANG
java.lang.ThreadGroup
20.21
public int activeCount();
//
deprecated
public int activeGroupCount();
//
deprecated
public int enumerate(Thread list[]);
//
deprecated
public int enumerate(Thread list[],
//
deprecated
boolean recurse);
public int enumerate(ThreadGroup list[]);
//
deprecated
public int enumerate(ThreadGroup list[],
//
deprecated
boolean recurse);
public void list();
public void uncaughtException(Thread t, Throwable e);
}
Every thread group has a
maximum priority
. The priority of a thread cannot be
set ( 20.20.23) higher than the maximum priority of its thread group.
Each thread group may or may not be marked as a
daemon
. When a new
ThreadGroup
object is created, the newly created thread group is marked as a
daemon thread group if and only if the thread group to which it belongs is cur
rently a daemon thread group. But the daemonhood of a thread group
G
may be
changed at any time by calling the
setDaemon
method of the
ThreadGroup
object
that represents
G
(provided that the security manager ( 20.17.12) approves execu
tion of the
setDaemon
operation).
Every thread group has a name, which is a
String
, for identification pur
poses. More than one thread group may have the same name.
Creation of a thread group requires the approval of the
checkAccess
method
( 20.21.4) of its proposed parent thread group, which forwards the decision to the
security manager ( 20.17.11).
20.21.1
public ThreadGroup(String name)
throws SecurityException
First, the
checkAccess
method ( 20.21.4) of the thread group to which the cur
rent thread belongs is called with no arguments.
This constructor initializes a newly created
ThreadGroup
object so that it has
the specified
name
as its name and belongs to the same thread group as the thread
that is creating the new thread group.
This constructor has exactly the same effect as the explicit constructor call
this(Thread.currentThread().getThreadGroup(), name)
( 20.21.2).
603
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved