public class RemoteControlHttpServer extends Thread
RequestProcessor for every
connection.
Taken from YWMS plugin by frsantos.Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
private static RemoteControlHttpServer |
instance4
The server instance for IPv4
|
private static RemoteControlHttpServer |
instance6
The server instance for IPv6
|
private ServerSocket |
server
The server socket
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
RemoteControlHttpServer(int port,
boolean ipv6)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
static void |
restartRemoteControlHttpServer()
Starts or restarts the HTTP server
|
void |
run()
The main loop, spawns a
RequestProcessor for each connection |
static void |
stopRemoteControlHttpServer()
Stops the HTTP server
|
void |
stopServer()
Stops the HTTP server
|
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, yieldprivate final ServerSocket server
private static volatile RemoteControlHttpServer instance4
private static volatile RemoteControlHttpServer instance6
public RemoteControlHttpServer(int port, boolean ipv6) throws IOException
port - The port this server will listen onipv6 - Whether IPv6 or IPv4 server should be startedIOException - when connection errorspublic static void restartRemoteControlHttpServer()
public static void stopRemoteControlHttpServer()
public void run()
RequestProcessor for each connectionpublic void stopServer() throws IOException
IOException - if any I/O error occurs