public abstract class HttpServer extends Object implements Runnable
The HttpServer
class is an abstract class that implements
a minimal GET method for a web server, primarily as a basis to implement WadoServer
.
An abstract inner class, such as HttpServer.Worker
,
needs to be extended by any concrete sub-class, and in particular its generateResponseToGetRequest()
implemented.
WadoServer
Modifier and Type | Class and Description |
---|---|
protected class |
HttpServer.Worker |
Modifier and Type | Field and Description |
---|---|
protected static int |
defaultNumberOfWorkers |
Constructor and Description |
---|
HttpServer() |
HttpServer(int port) |
HttpServer(int port,
int numberOfWorkers) |
Modifier and Type | Method and Description |
---|---|
protected abstract HttpServer.Worker |
createWorker() |
void |
initializeThreadPool(int port) |
void |
initializeThreadPool(int port,
int numberOfWorkers) |
void |
run() |
public HttpServer()
public HttpServer(int port)
public HttpServer(int port, int numberOfWorkers)
protected abstract HttpServer.Worker createWorker()
public void initializeThreadPool(int port)
public void initializeThreadPool(int port, int numberOfWorkers)