| | |
| | | * æ¥è¯¢æå¡èµæºç¶æ |
| | | */ |
| | | public List<ResEntity> selectResStatus() { |
| | | List<ResEntity> resList = resService.selectResAll(); |
| | | List<ResEntity> resList = resService.selectAll(); |
| | | |
| | | return testResStatus(resList); |
| | | } |
| | |
| | | for (ResEntity re : resList) { |
| | | Socket socket = new Socket(); |
| | | try { |
| | | if (StringHelper.isEmpty(re.getServer())) { |
| | | if (StringHelper.isEmpty(re.getTest())) { |
| | | list.add(re); |
| | | continue; |
| | | } |
| | | |
| | | URI uri = new URI(re.getServer()); |
| | | URI uri = new URI(re.getTest()); |
| | | SocketAddress add = new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 80 : uri.getPort()); |
| | | |
| | | // Pingéå°å |
| | |
| | | * ç»è®¡æå¡èµæºç¶æ |
| | | */ |
| | | public JSONObject countResStatus() { |
| | | List<ResEntity> resList = resService.selectResAll(); |
| | | List<ResEntity> resList = resService.selectAll(); |
| | | List<ResEntity> unableList = testResStatus(resList); |
| | | |
| | | JSONObject jsonObject = new JSONObject(); |