API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.lang. ThreadGroup View Source
Author(s)
unascribed
Since
JDK1.0
Version
1.65, 11/17/05
Serial
Hierarchy
 Object
      ThreadGroup
Implements
 Thread.UncaughtExceptionHandler
Subclasses
Description
public class ThreadGroup
  A thread group represents a set of threads.
See also:   
Constructors
private ThreadGroup ()
  Creates an empty Thread group that is not in any Thread group.
public ThreadGroup (String name)
  Constructs a new thread group.
public ThreadGroup (ThreadGroup parent, String name)
  Creates a new thread group.
Methods
Hide/Show inherited methods
public int activeCount ()
  Returns an estimate of the number of active threads in this thread group.
public int activeGroupCount ()
  Returns an estimate of the number of active groups in this thread group.
pack-private void add (Thread t)
  Adds the specified Thread to this group.
pack-private void addUnstarted ()
  Increments the count of unstarted threads in the thread group.
@Deprecated
public boolean allowThreadSuspension (boolean b)
  Used by VM to control lowmem implicit suspension.
publicfinal void checkAccess ()
  Determines if the currently running thread has permission to modify this thread group.
publicfinal void destroy ()
  Destroys this thread group and all of its subgroups.
public int enumerate (Thread list)
  Copies into the specified array every active thread in this thread group and its subgroups.
public int enumerate (Thread list, boolean recurse)
  Copies into the specified array every active thread in this thread group.
public int enumerate (ThreadGroup list)
  Copies into the specified array references to every active subgroup in this thread group.
public int enumerate (ThreadGroup list, boolean recurse)
  Copies into the specified array references to every active subgroup in this thread group.
publicfinal int getMaxPriority ()
  Returns the maximum priority of this thread group.
publicfinal String getName ()
  Returns the name of this thread group.
publicfinal ThreadGroup getParent ()
  Returns the parent of this thread group.
publicfinal void interrupt ()
  Interrupts all threads in this thread group.
publicfinal boolean isDaemon ()
  Tests if this thread group is a daemon thread group.
publicsynchronized boolean isDestroyed ()
  Tests if this thread group has been destroyed.
public void list ()
  Prints information about this thread group to the standard output.
pack-private void list (PrintStream out, int indent)
publicfinal boolean parentOf (ThreadGroup g)
  Tests if this thread group is either the thread group argument or one of its ancestor thread groups.
pack-private void remove (Thread t)
  Removes the specified Thread from this group.
@Deprecated
publicfinal void resume ()
  Resumes all threads in this thread group.
publicfinal void setDaemon (boolean daemon)
  Changes the daemon status of this thread group.
publicfinal void setMaxPriority (int pri)
  Sets the maximum priority of the group.
@Deprecated
publicfinal void stop ()
  Stops all threads in this thread group.
@Deprecated
publicfinal void suspend ()
  Suspends all threads in this thread group.
public String toString ()
  Returns a string representation of this Thread group.
public void uncaughtException (Thread t, Throwable e) [Specified in Thread.UncaughtExceptionHandler]
  Called by the Java Virtual Machine when a thread in this thread group stops because of an uncaught exception, and the thread does not have a specific Thread.UncaughtExceptionHandler installed.
Fields
Hide/Show inherited fields
pack-private boolean daemon
pack-private boolean destroyed
pack-private ThreadGroup groups
pack-private int maxPriority
pack-private String name
pack-private int ngroups
pack-private int nthreads
pack-private int nUnstartedThreads
pack-private ThreadGroup parent
pack-private Thread threads
pack-private boolean vmAllowSuspension
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar