|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.ThreadGroup marf.util.ExpandedThreadGroup
public class ExpandedThreadGroup
Provides some useful extensions to java.lang.ThreadGroup one would normally expect to be in a "group".
Maintains local references to the group-belonging threads for extra group control in a form of a Vector.
$Id: ExpandedThreadGroup.java,v 1.15 2007/12/23 06:29:47 mokhov Exp $
Field Summary | |
---|---|
protected java.util.Vector |
oGroup
Local references to the threads belonging to this group. |
Constructor Summary | |
---|---|
ExpandedThreadGroup(ExpandedThreadGroup poParent,
java.lang.String pstrName)
Mimics parent's constructor. |
|
ExpandedThreadGroup(java.lang.String pstrName)
Mimics parent's constructor. |
|
ExpandedThreadGroup(java.lang.ThreadGroup poParent,
java.lang.String pstrName)
ThreadGroup and name constructor inherited from the parent. |
Method Summary | |
---|---|
void |
addThread(java.lang.Thread poThread)
Adds specified thread to the local reference list. |
java.lang.Thread[] |
enumerate(boolean pbActiveThreads)
Provides an enumeration that allocates a new array and populates it with currently active threads with ThreadGroup's enumerate(). |
static java.lang.String |
getMARFSourceCodeRevision()
Retrieves class' revision. |
void |
join()
Wait for all the threads in the group to terminate. |
void |
start()
Starts all non-started threads in this group. |
Methods inherited from class java.lang.ThreadGroup |
---|
activeCount, activeGroupCount, allowThreadSuspension, checkAccess, destroy, enumerate, enumerate, enumerate, enumerate, getMaxPriority, getName, getParent, interrupt, isDaemon, isDestroyed, list, parentOf, resume, setDaemon, setMaxPriority, stop, suspend, toString, uncaughtException |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.Vector oGroup
Constructor Detail |
---|
public ExpandedThreadGroup(java.lang.ThreadGroup poParent, java.lang.String pstrName)
poParent
- Parent grouppstrName
- Group's namepublic ExpandedThreadGroup(java.lang.String pstrName)
pstrName
- Group's namepublic ExpandedThreadGroup(ExpandedThreadGroup poParent, java.lang.String pstrName)
poParent
- Parent grouppstrName
- Group's nameMethod Detail |
---|
public void start()
public void join() throws java.lang.InterruptedException
java.lang.InterruptedException
- if one of the threads is
interrupted or a thread group has been startedpublic java.lang.Thread[] enumerate(boolean pbActiveThreads)
pbActiveThreads
- if only active threads needed, false if all
public void addThread(java.lang.Thread poThread)
poThread
- thread object to addpublic static java.lang.String getMARFSourceCodeRevision()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |