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; }
public String getAlertMail() { PageIOUtils.printToPage(this.alertMailJson); return NONE; }