/** Shutdown heartbeat server and send a kill signal to child processes */ public static synchronized void shutdown() { if (server != null) { server.shutdown(); server = null; } }
/** * Creates a server thread in the parent process posting a periodic heartbeat. * * @return server port - must be passed to {@link startClientWatchdogService()} */ public static synchronized int getChildProcessHeartbeatServerPort() { if (server == null) throw new IllegalStateException("Heartbeat Server has not started!"); return server.getPort(); }
public static synchronized void startHeartBeatServer() { if (server == null) { server = new HeartbeatServer(); server.start(); } }
public static synchronized boolean isServerRunning() { if (server == null) { return false; } return server.isRunning(); }
public static synchronized boolean isAnyAppServerAlive() { if (server == null) return false; return server.isAnyAppServerAlive(); }