Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## php.java.bridge.http
Class HttpServer

    java.lang.Object
      php.java.bridge.http.HttpServer

All Implemented Interfaces:
  java.lang.Runnable

Direct Known 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 is used when running local scripts like `e.eval(new StringReader('<?php phpinfo(); ?>'));`. For remote scripts use a HttpProxy and URLReader instead.

Author:
  jostb
See Also:
  `HttpRequest`, `HttpResponse`, `CGIRunner`, `URLReader`, `HttpProxy`

Constructor Summary
`HttpServer()` Create a new HTTP Server.

Method Summary
`abstract ISocketFactory` | `bind()` Create a new server socket
`void` | `destroy()` Stop the HTTP server.
`ISocketFactory` | `getSocket()` Returns the server socket.
`void` | `run()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HttpServer

    public HttpServer()

  Create a new HTTP Server.

  See Also:
    `destroy()`

Method Detail

### bind

    public abstract ISocketFactory bind()

  Create a new server socket

  Returns:
    The server socket.

### run

    public void run()

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

### destroy

    public void destroy()

  Stop the HTTP server.

### getSocket

    public ISocketFactory getSocket()

  Returns the server socket.

  Returns:
    The server socket.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD