@@ -0,0 +1,485 @@
+package com.trimc.blogger.commons.utils;%0A%0Aimport java.net.Socket;%0A%0Apublic final class SocketUtils %7B%0A%0A%09/* dc:url %3Chttp://www.geekality.net/2013/04/30/java-simple-check-to-see-if-a-server-is-listening-on-a-port/%3E */%0A%09public static boolean serverListening(String host, int port) %7B%0A%09%09Socket s = null;%0A%09%09try %7B%0A%09%09%09s = new Socket(host, port);%0A%09%09%09return true;%0A%09%09%7D catch (Exception e) %7B%0A%09%09%09return false;%0A%09%09%7D finally %7B%0A%09%09%09if (s != null) try %7B%0A%09%09%09%09s.close();%0A%09%09%09%7D catch (Exception e) %7B%7D%0A%09%09%7D%0A%09%7D%0A%7D%0A

refactor systemUp logic into common class