net.eduvax.util
public class EThread extends java.lang.Thread
Modifier and Type | Field and Description |
---|---|
private static java.util.Vector<EThread> |
_activeThreads |
private java.lang.Runnable |
_toRun
runnable to used as thread proc
|
static java.lang.String |
MSG_ABORTED |
static java.lang.String |
MSG_COMPLETED |
static java.lang.String |
MSG_EXCEPTION |
static java.lang.String |
MSG_MONITOR_CONT |
static java.lang.String |
MSG_MONITOR_NOTIFY |
static java.lang.String |
MSG_MONITOR_TIMEOUT |
static java.lang.String |
MSG_MONITOR_WAIT |
static java.lang.String |
MSG_REQUEST |
static java.lang.String |
MSG_SLEEP_END |
static java.lang.String |
MSG_SLEEP_START |
static java.lang.String |
MSG_START |
Constructor and Description |
---|
EThread(java.lang.String name,
java.lang.Runnable run)
Create new extended thread
|
Modifier and Type | Method and Description |
---|---|
static void |
doNotify(java.lang.Object monitor) |
static void |
doNotifyAll(java.lang.Object monitor) |
static void |
doWait(java.lang.Object monitor) |
static boolean |
doWait(java.lang.Object monitor,
long timeout) |
static void |
doWait(java.lang.Object monitor,
long timeout,
int nanos) |
static java.util.Iterator<EThread> |
getActiveThreads() |
boolean |
isCurrentThread() |
private static java.lang.String |
objRef(java.lang.Object obj) |
void |
run() |
void |
start() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
private java.lang.Runnable _toRun
private static java.util.Vector<EThread> _activeThreads
public static final java.lang.String MSG_REQUEST
public static final java.lang.String MSG_START
public static final java.lang.String MSG_COMPLETED
public static final java.lang.String MSG_ABORTED
public static final java.lang.String MSG_EXCEPTION
public static final java.lang.String MSG_SLEEP_START
public static final java.lang.String MSG_SLEEP_END
public static final java.lang.String MSG_MONITOR_WAIT
public static final java.lang.String MSG_MONITOR_CONT
public static final java.lang.String MSG_MONITOR_TIMEOUT
public static final java.lang.String MSG_MONITOR_NOTIFY
public EThread(java.lang.String name, java.lang.Runnable run)
name
- thread name.run
- runnable to use as thread main proc.public void start()
start
in class java.lang.Thread
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public boolean isCurrentThread()
private static java.lang.String objRef(java.lang.Object obj)
public static void doWait(java.lang.Object monitor) throws java.lang.InterruptedException
java.lang.InterruptedException
public static boolean doWait(java.lang.Object monitor, long timeout) throws java.lang.InterruptedException
java.lang.InterruptedException
public static void doWait(java.lang.Object monitor, long timeout, int nanos) throws java.lang.InterruptedException
java.lang.InterruptedException
public static void doNotify(java.lang.Object monitor)
public static void doNotifyAll(java.lang.Object monitor)
public static java.util.Iterator<EThread> getActiveThreads()