|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.util.ThreadHandler
public final class ThreadHandler
The ThreadHandler is a utility class for ThreadManager. It
is the singleton access to global thread management.
| Method Summary | |
|---|---|
static boolean |
add(Thread pThread)
Adds a thread to the thread list. |
static List<Thread> |
getPendingStoppedThreads()
Gets all pending stopped threads which are already alive. |
static List<Thread> |
getRunningThreads()
Gets all alive threads from the thread list. |
static boolean |
isStopped()
Gets if the current thread is stopped. |
static boolean |
isStopped(Thread pThread)
Gets if the given thread is stopped. |
static void |
remove(Thread pThread)
Removes a thread from the list. |
static Thread |
start(Runnable pRunnable)
Starts a thread and adds it to the thread list. |
static void |
stop()
Stops/interrupts all threads from the thread list. |
static Thread |
stop(Thread pThread)
Stops/interrupts a thread and removes it from the thread list. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean add(Thread pThread)
pThread - the thread
true if the thread was added, otherwise falseThreadManager.add(Thread)public static void remove(Thread pThread)
pThread - the threadThreadManager.remove(Thread)public static Thread start(Runnable pRunnable)
pRunnable - a Thread or another Runnable implementation
Thread with the pRunnable or pRunnable
if it's an instance of Thread and the thread is still alive.getRunningThreads(),
ThreadManager.start(Runnable)public static Thread stop(Thread pThread)
pThread - the thread, which is to be stopped
nullgetPendingStoppedThreads(),
ThreadManager.stop(Thread)public static void stop()
stop(Thread),
ThreadManager.stop()public static boolean isStopped()
true if the current thread is stopped, otherwise falseThreadManager.isStopped()public static boolean isStopped(Thread pThread)
pThread - the thread
true if pThread is stopped or pThread == null, otherwise falseThreadManager.isStopped(Thread)public static List<Thread> getPendingStoppedThreads()
ThreadManager.getPendingStoppedThreads()public static List<Thread> getRunningThreads()
ThreadManager.getRunningThreads()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||