Class ServiceStopWatcher
java.lang.Object
com.iizix.server.ServiceStopWatcher
The server's side of a graceful Windows service stop (CC-SERVER-RESTART-UPDATE-V5, stage-native): under the service wrapper (
-supervisor wrapper) a daemon thread polls the file "server.stop" in the server's current directory, which the wrapper writes when SrvAny signals a service STOP; the server then asks itself to stop - exit code 0 through its dispose, every client told - instead of being killed. The file is deleted when it is acted on, so that a stale one never stops the next start. The old SrvAny kills the process tree instead: this watcher then never sees a file, and nothing is lost.- Author:
- Christopher Mindus
Field Summary
FieldsMethod Summary
Modifier and TypeMethodDescriptionstatic Threadstart(ServerShell server) Starts the watcher for a server.
Field Details
FILE
The file the wrapper writes:server.stopin the server's current directory.- See Also:
Method Details
start
Starts the watcher for a server.- Parameters:
server- The server.- Returns:
- The thread, started and daemon.