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:
com.caucho.server.TcpServer
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 |
HttpServer
public HttpServer()
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.