void (int exitCode) { super.notifyProcessTerminated(exitCode); String message = "Watcher terminated with exit code " + exitCode; if (myIsShuttingDown) LOG.info(message); else LOG.warn(message); myProcessHandler = null; try { startupProcess(true); } catch (IOException e) { shutdownProcess(true); LOG.warn("Watcher terminated and attempt to restart has failed. Exiting watching thread.", e); } }