20.21
java.lang.ThreadGroup
THE PACKAGE JAVA.LANG
20.21 The Class
java.lang.ThreadGroup
A thread group is a set of threads and thread groups. Every thread belongs to
exactly one thread group, and every thread group but one (called the system
thread group ) belongs to some other thread group. Thus thread groups form a
tree with the system thread group at the root.
Thread groups provide a way to manage threads and to impose security
boundaries; for example, a thread may always create a new thread within its own
thread group, but creating a thread in another thread group requires the approval
of the security manager ( 20.17), as does the creation of a new thread group.
public class ThreadGroup {
public ThreadGroup(String name)
throws SecurityException;
public ThreadGroup(ThreadGroup parent, String name)
throws NullPointerExpression, SecurityException,
IllegalThreadStateException;
public String toString();
public final void checkAccess();
public final String getName();
public final ThreadGroup getParent();
public final boolean parentOf(ThreadGroup g);
public final void stop()
throws SecurityException;
public final void suspend()
throws SecurityException;
public final void resume()
throws SecurityException;
public final void destroy()
throws SecurityException, IllegalThreadStateException;
public final int getMaxPriority();
public final void setMaxPriority(int newMaxPriority)
throws SecurityException, IllegalArgumentException;
public final boolean isDaemon();
public final void setDaemon(boolean daemon)
throws SecurityException;
public int threadsCount();
public int allThreadsCount();
public int groupsCount();
public int allGroupsCount();
public Thread[] threads();
public Thread[] allThreads();
public ThreadGroup[] groups();
public ThreadGroup[] allGroups();
602
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