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

## com.caucho.server.http
Class HttpServer

    java.lang.Object
      |
      +--com.caucho.server.http.HttpServer

All Implemented Interfaces:
  com.caucho.server.RequestFactory

public class HttpServer
extends java.lang.Object
implements com.caucho.server.RequestFactory

The main class for the HTTP server.

TcpServer handles the main thread control. HttpServer just needs to create the right kind of request when a new thread is spawned.

If the -deadwait flag is received, the main thread will wait on System.in. When System.in closes, HttpServer will gracefully shutdown the server. This will automatically close the server when a parent watchdog process closes.

To use the -deadwait feature, the watchdog will need to create a pipe and dup() the Java process's stdin.

See Also:
  `TcpServer`

Constructor Summary
`HttpServer()` Create a new server.

Method Summary
`com.caucho.server.ServerRequest` | `createRequest(com.caucho.server.Server server)` Create a HttpRequest object for the new thread.
`static void` | `main(java.lang.String[] argv)` The main start of the web server.

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

Constructor Detail

### HttpServer

    public HttpServer()
               throws java.lang.Exception

  Create a new server.

  The pwd parameter lets a test suite create a memory-based filesystem instead of having to muck with a real filesystem.

  Parameters:
    `node` - the server's configuration.
    `pwd` - the server's file context.

Method Detail

### createRequest

    public com.caucho.server.ServerRequest createRequest(com.caucho.server.Server server)

  Create a HttpRequest object for the new thread.
  Specified by:
    `createRequest` in interface `com.caucho.server.RequestFactory`

### main

    public static void main(java.lang.String[] argv)
                     throws java.lang.Exception

  The main start of the web server.

       -conf resin.conf   : alternate configuration file
       -port port         : set the server's portt
       -deadwait          : graceful shutdown when stdin closes.

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