com.pixelmed.web

## Class HttpServer

- java.lang.Object
- - com.pixelmed.web.HttpServer

All Implemented Interfaces:
  java.lang.Runnable

Direct Known Subclasses:
  RequestTypeServer, WadoServer

    public abstract class HttpServer
    extends java.lang.Object
    implements java.lang.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.

See Also:
  `WadoServer`

### Nested Class Summary

Nested Classes
`protected class` `HttpServer.Worker`

### Field Summary

Fields
`protected static int` `defaultNumberOfWorkers`
`protected int` `webServerDebugLevel`

### Constructor Summary

Constructors
Constructor and Description
`HttpServer(int webServerDebugLevel)`
`HttpServer(int port, int webServerDebugLevel)`
`HttpServer(int port, int webServerDebugLevel, int numberOfWorkers)`

### Method Summary

Methods
`protected abstract HttpServer.Worker` `createWorker()`
`void` `initializeThreadPool(int port)`
`void` `initializeThreadPool(int port, int numberOfWorkers)`
`void` `run()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### webServerDebugLevel

    protected int webServerDebugLevel

#### defaultNumberOfWorkers

    protected static int defaultNumberOfWorkers

### Constructor Detail

#### HttpServer

    public HttpServer(int webServerDebugLevel)

#### HttpServer

    public HttpServer(int port,
              int webServerDebugLevel)

#### HttpServer

    public HttpServer(int port,
              int webServerDebugLevel,
              int numberOfWorkers)

### Method Detail

#### initializeThreadPool

    public void initializeThreadPool(int port,
                            int numberOfWorkers)

#### initializeThreadPool

    public void initializeThreadPool(int port)

#### run

    public void run()

Specified by:
  `run` in interface `java.lang.Runnable`

#### createWorker

    protected abstract HttpServer.Worker createWorker()