Package com.pixelmed.web

# Class HttpServer

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

All Implemented Interfaces:
  `Runnable`

Direct Known Subclasses:
  `RequestTypeServer`, `WadoServer`

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.

See Also:
  - `WadoServer`

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`protected class`
`HttpServer.Worker`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected static int`
`defaultNumberOfWorkers`

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`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, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### defaultNumberOfWorkers

protected static int defaultNumberOfWorkers

## Constructor Details

### HttpServer

public HttpServer()

### HttpServer

public HttpServer(int port)

### HttpServer

public HttpServer(int port, int numberOfWorkers)

## Method Details

### initializeThreadPool

public void initializeThreadPool(int port, int numberOfWorkers)

### initializeThreadPool

public void initializeThreadPool(int port)

### run

public void run()

Specified by:
  `run` in interface `Runnable`

### createWorker

protected abstract HttpServer.Worker createWorker()