### php.java.bridge.http

# Class HttpServer

- `java.lang.Object`

- `php.java.bridge.http.HttpServer`

Implemented Interfaces:
  java.lang.Runnable

Known Direct Subclasses:
  JavaBridgeRunner

`public abstract class HttpServer`
`extends java.lang.Object`
`implements java.lang.Runnable`

This class can be used to create a simple HTTP server. It can be used during development, when no HTTP server or Servlet engine is available.

Author:
  jostb

## Constructor Summary

`HttpServer()`
  Create a new HTTP Server.

## Method Summary

`ISocketFactory`

`bind()`
  Create a new server socket

`void`

`destroy()`
  Stop the HTTP server.

`void`

`run()`
  This method will be called by whoever wishes to run your class implementing Runnable.

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

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

## Constructor Details

### HttpServer

    public HttpServer()

> Create a new HTTP Server.

> See Also:
>   `destroy()`

## Method Details

### bind

    public ISocketFactory bind()

> Create a new server socket

> Returns:
>   The server socket.

### destroy

    public void destroy()

> Stop the HTTP server.

### run

    public void run()

> This method will be called by whoever wishes to run your class implementing Runnable. Note that there are no restrictions on what you are allowed to do in the run method, except that you cannot throw a checked exception.
> Specified by:
>   run in interface java.lang.Runnable