Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected String |
docroot
Socket for the web server
|
protected String |
myDNS
default TCP/HTTP port
|
protected String |
myIP
Own Computer Name
|
protected int |
myport
Directory of HTML pages and other files
|
protected ServerSocket |
mySocket
Own IP address
|
static int |
TCP_PORT_DEFAULT
Private Methods and Constants
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
HTTPServer(String documentRootDirectory,
int port,
String indexFileName,
String dataDir)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
getStopFlag()
return status of Stop flag
|
void |
run()
Start it
|
void |
stopWeb()
set the Stop flag so that the web server thread will detect & stop accordingly
|
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, yield
public static int TCP_PORT_DEFAULT
protected String myDNS
protected String myIP
protected ServerSocket mySocket
protected String docroot
protected int myport
public HTTPServer(String documentRootDirectory, int port, String indexFileName, String dataDir) throws Exception
documentRootDirectory
- location of document rootport
- port no.indexFileName
- default filenamedataDir
- data directory location to save uploaded filesException
- failure