Пример #1
0
 public String validatePing() {
   String ip = ServletActionContext.getRequest().getParameter("ip");
   int port = Integer.parseInt(ServletActionContext.getRequest().getParameter("port"));
   String pageOut = "fail";
   boolean ping = PingUtils.ping(ip, port);
   if (!ping) {
     AppLogger.daemonErrorLogger.error(
         String.format("validate ip:%s,port:%s cannot ping!", ip, port));
   } else {
     pageOut = "success";
   }
   PageIOUtils.printToPage(pageOut);
   return NONE;
 }
Пример #2
0
 public String getAlertMail() {
   PageIOUtils.printToPage(this.alertMailJson);
   return NONE;
 }