public class ServerDaemon
extends java.lang.Thread
| Modifier and Type | Field and Description |
|---|---|
static org.apache.log4j.Logger |
log
Used for logging.
|
| Constructor and Description |
|---|
ServerDaemon()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
block()
Blocks and stops the daemon.
|
boolean |
daemonIsRunning()
Indicates whether or not the daemon is currently running
|
HTTPSession |
getHTTPSession()
Gets the
HTTPSession associated
with this server daemon. |
boolean |
initializeServer(int port)
Initializes the server and passes it a port to listen
on.
|
boolean |
isBlocked()
Indicates whether or not the server is currently
blocked.
|
void |
run()
The meat of the daemon.
|
void |
setHTTPSession(HTTPSession session)
Sets the
HTTPSession associated
with this server daemon. |
void |
shutdownDaemon()
Shuts down the server.
|
void |
startDaemon()
Start up the daemon.
|
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, start, stop, stop, suspend, toString, yieldpublic HTTPSession getHTTPSession()
HTTPSession associated
with this server daemon.public void setHTTPSession(HTTPSession session)
HTTPSession associated
with this server daemon.session - The HTTP session.public boolean initializeServer(int port)
port - The port on which to listenpublic boolean daemonIsRunning()
public void startDaemon()
public void shutdownDaemon()
public void block()
public boolean isBlocked()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Thread