org.jafer.zserver
Class ZServerThread
java.lang.Object
java.lang.Thread
org.jafer.zserver.ZServerThread
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Runnable
- Direct Known Subclasses:
- Operation, Session, ZServer
public abstract class ZServerThread
- extends java.lang.Thread
- implements java.io.Serializable
Enables thread management (live threads stored in vector) and recursive halt of childThreads
- Version:
- 1.0
- Author:
- Antony Corfield; Matthew Dovey; Colin Tatham
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class java.lang.Thread |
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, 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, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
STATE_RUNNING
public static int STATE_RUNNING
STATE_STOPPED
public static int STATE_STOPPED
STATE_STOPPING
public static int STATE_STOPPING
stopping
private volatile boolean stopping
stopped
private volatile boolean stopped
logger
public static java.util.logging.Logger logger
threads
private java.util.Vector threads
state
private int state
startTime
private long startTime
ZServerThread
public ZServerThread(java.lang.String name)
setStartTime
public void setStartTime(long startTime)
getStartTime
public long getStartTime()
setStopping
public void setStopping(boolean stopping)
isStopping
public boolean isStopping()
setStopped
public void setStopped(boolean stopped)
isStopped
public boolean isStopped()
setThreads
public void setThreads(java.util.Vector threads)
getThreads
public java.util.Vector getThreads()
hasThreads
public boolean hasThreads()
purgeThreads
public java.util.Vector purgeThreads()
startThread
public void startThread(java.lang.Thread thread)
setThreadName
public void setThreadName(java.lang.String name)
getServerThreadId
public int getServerThreadId()
halt
public void halt(long timeout)
waitForThreads
private void waitForThreads(long timeout)
close
public void close()
getNumberOfActiveThreads
public int getNumberOfActiveThreads()
getActiveThreads
public java.util.Vector getActiveThreads()
getUpTime
public long getUpTime()
getServerThreadState
public int getServerThreadState()