com.caucho.server.http
Class ResinServer

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

public class ResinServer
extends java.lang.Object

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:
com.caucho.server.TcpServer

Constructor Summary
ResinServer(java.lang.String[] argv, boolean isHttp)
          Create a new Resin server.
 
Method Summary
 void close()
          Close the server, the TCP sockets and the threads.
 void init()
          Initialize the server, binding to TCP and starting the threads.
static void main(java.lang.String[] argv, boolean isHttp)
          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

ResinServer

public ResinServer(java.lang.String[] argv,
                   boolean isHttp)
            throws java.lang.Exception
Create a new Resin server.
Parameters:
argv - the command-line to initialize Resin with
isHttp - default to http
Method Detail

init

public void init()
          throws java.lang.Exception
Initialize the server, binding to TCP and starting the threads.

close

public void close()
           throws java.lang.Exception
Close the server, the TCP sockets and the threads.

main

public static void main(java.lang.String[] argv,
                        boolean isHttp)
                 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.