java.lang.ThreadGroup (JDK 1.0)
This class defines a group of threads and allows operations on the group as a whole. A ThreadGroup may contain Thread objects, as well as "child" ThreadGroup objects. All ThreadGroup objects are created as children of some other ThreadGroup, and thus there is a parent/child hierarchy of ThreadGroup objects.
Some programs may find it convenient to define their own ThreadGroup, but generally thread groups are only used by system-level applications.
public classThreadGroupextends Object { //Public ConstructorspublicThreadGroup(Stringname); publicThreadGroup(ThreadGroupparent, Stringname); //Public Instance Methodspublic intactiveCount(); public intactiveGroupCount(); 1.1public booleanallowThreadSuspension(booleanb); public final voidcheckAccess(); public final voiddestroy(); public intenumerate(Thread[]list); public intenumerate(Thread[]list, booleanrecurse); public intenumerate(ThreadGroup[]list); public intenumerate(ThreadGroup[]list, booleanrecurse); public final intgetMaxPriority(); public final StringgetName(); public final ThreadGroupgetParent(); public final booleanisDaemon(); 1.1public synchronized booleanisDestroyed(); public voidlist(); public final booleanparentOf(ThreadGroupg); public final voidresume(); public final voidsetDaemon(booleandaemon); public final voidsetMaxPriority(intpri); public final voidstop(); public final voidsuspend(); public StringtoString(); //Overrides Objectpublic voiduncaughtException(Threadt, Throwablee); }
Passed To:
SecurityManager.checkAccess(), Thread(), ThreadGroup(), ThreadGroup.enumerate(), ThreadGroup.parentOf()
Returned By:
SecurityManager.getThreadGroup(), Thread.getThreadGroup(), ThreadGroup.getParent()