public class ShutdownListener
extends java.lang.Object
This class implements a socket listener bound to the localhost only and listening for a token. Both the token and the port number are given as environment variables and are set during service startup by the ifssrv.exe executable.
On service shutdown ifssrv.exe will send the token to the listener; listener simply makes call to System.exit(), which makes it possible to execute any shutdown hook.
The algorithm is a result of Sun Java VM implementation that doesn't listen on any OS signal if started with -Xrs command line modifier.
| Modifier and Type | Method and Description |
|---|---|
static void |
start()
Starts the listener if not already started.
|