Example #1
0
 /** Shutdown heartbeat server and send a kill signal to child processes */
 public static synchronized void shutdown() {
   if (server != null) {
     server.shutdown();
     server = null;
   }
 }
Example #2
0
 /**
  * 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();
 }
Example #3
0
 public static synchronized void startHeartBeatServer() {
   if (server == null) {
     server = new HeartbeatServer();
     server.start();
   }
 }
Example #4
0
 public static synchronized boolean isServerRunning() {
   if (server == null) {
     return false;
   }
   return server.isRunning();
 }
Example #5
0
 public static synchronized boolean isAnyAppServerAlive() {
   if (server == null) return false;
   return server.isAnyAppServerAlive();
 }