@Override
        public void run() {
            try { 
                if (stdin.ready()) {
                    if (EXIT.equalsIgnoreCase(stdin.readLine())) {
                        System.exit(0); // invokes shutdown hook(s)
                    }
                }
            } catch (IOException ioe) {
                logger.error("Error reading console input", ioe);
            }
        }
This timer task is used to monitor the System input stream
for a "terminate" command from the launcher (or the console). 
This allows for a graceful shutdown when Openfire is started 
via the launcher, especially in Windows.
xmppserver/src/main/java/org/jivesoftware/openfire/XMPPServer.java