|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.common.util.ThreadUtil
public class ThreadUtil
Various utilities for examining the running Threads and controlling their execution.
Distribution Licence: JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA The copyright to this program is held by it's authors. |
Licence
Field Summary | |
---|---|
private static String |
PADDING
|
Constructor Summary | |
---|---|
private |
ThreadUtil()
Prevent Instansiation |
Method Summary | |
---|---|
private static void |
addItem(List vec,
int depth,
String item)
Private, used by getListing. |
static ThreadGroup |
findRoot()
Find the root ThreadGroup by ascending the Thread tree |
static String[] |
getListing()
Create a StringArray (mostly for debugging) detailing the current Threads, starting at the root ThreadGroup |
static String[] |
getListing(ThreadGroup base)
Create a StringArray (mostly for debugging) detailing the current Threads, starting at the specified ThreadGroup |
private static void |
listThread(List vec,
int depth,
Thread thread)
Private, used by getListing. |
private static void |
listThreads(List vec,
int depth,
ThreadGroup group)
Private, used by getListing. |
static void |
soundSleep(long millis)
Sleep and don't think about throwing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final String PADDING
Constructor Detail |
---|
private ThreadUtil()
Method Detail |
---|
public static void soundSleep(long millis)
millis
- The length of time to wait in millisecondsInterruptedException
public static ThreadGroup findRoot()
public static String[] getListing()
public static String[] getListing(ThreadGroup base)
base
- The ThreadGroup to detail
private static void listThreads(List vec, int depth, ThreadGroup group)
vec
- The Vector to add to.depth
- The current recursion depthgroup
- The ThreadGroup to detailprivate static void listThread(List vec, int depth, Thread thread)
vec
- The List to add to.depth
- The current recursion depththread
- The Thread to detailprivate static void addItem(List vec, int depth, String item)
vec
- The List to add to.depth
- The current recursion depth
|
Copyright ? 2003-2004 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |