|
||||||||||
| 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(java.lang.Thread pThread)
Adds a thread to the thread list. |
static java.util.List<java.lang.Thread> |
getPendingStoppedThreads()
Gets all pending stopped threads which are already alive. |
static java.util.List<java.lang.Thread> |
getRunningThreads()
Gets all alive threads from the thread list. |
static boolean |
isStopped()
Gets if the current thread is stopped. |
static boolean |
isStopped(java.lang.Thread pThread)
Gets if the given thread is stopped. |
static void |
remove(java.lang.Thread pThread)
Removes a thread from the list. |
static java.lang.Thread |
start(java.lang.Runnable pRunnable)
Starts a thread and adds it to the thread list. |
static void |
stop()
Stops/interrupts all threads from the thread list. |
static java.lang.Thread |
stop(java.lang.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(java.lang.Thread pThread)
pThread - the thread
true if the thread was added, otherwise falseThreadManager.add(Thread)public static void remove(java.lang.Thread pThread)
pThread - the threadThreadManager.remove(Thread)public static java.lang.Thread start(java.lang.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 java.lang.Thread stop(java.lang.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(java.lang.Thread pThread)
pThread - the thread
true if pThread is stopped or pThread == null, otherwise falseThreadManager.isStopped(Thread)public static java.util.List<java.lang.Thread> getPendingStoppedThreads()
ThreadManager.getPendingStoppedThreads()public static java.util.List<java.lang.Thread> getRunningThreads()
ThreadManager.getRunningThreads()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||