|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.caucho.server.http.ResinServer
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.
com.caucho.server.TcpServer| Field Summary | |
protected com.caucho.server.http.ServletServer |
servletServer
|
| 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. |
protected void |
closeImpl()
Stub so JniServer can close down gracefully. |
void |
handleShutdown()
Called when the server shuts down. |
void |
init(boolean allowHttp)
Initialize the server, binding to TCP and starting the threads. |
boolean |
isClosed()
Returns true if the server has shut down. |
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 |
| Field Detail |
protected com.caucho.server.http.ServletServer servletServer
| Constructor Detail |
public ResinServer(java.lang.String[] argv,
boolean isHttp)
throws java.lang.Exception
argv - the command-line to initialize Resin withisHttp - default to http| Method Detail |
public boolean isClosed()
public void init(boolean allowHttp)
throws java.lang.Exception
public void close()
throws java.lang.Exception
protected void closeImpl()
public void handleShutdown()
handleShutdown in interface com.caucho.server.ShutdownListener
public static void main(java.lang.String[] argv,
boolean isHttp)
throws java.lang.Exception
-conf resin.conf : alternate configuration file -port port : set the server's portt -deadwait : graceful shutdown when stdin closes.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||