本文整理了Java中com.mpush.tools.Utils.checkHealth()
方法的一些代码示例,展示了Utils.checkHealth()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.checkHealth()
方法的具体详情如下:
包路径:com.mpush.tools.Utils
类名称:Utils
方法名:checkHealth
暂无
代码示例来源:origin: mpusher/mpush
@Test
public void test2() {
boolean ret = Utils.checkHealth("120.27.196.68", 80);
System.out.println(ret);
}
代码示例来源:origin: mpusher/mpush
@Test
public void test() {
boolean ret = Utils.checkHealth("120.27.196.68", 82);
System.out.println(ret);
}
代码示例来源:origin: mpusher/mpush
@Override
public void run() {
logger.debug("do dns mapping checkHealth ...");
Map<String, List<DnsMapping>> all = this.getAll();
Map<String, List<DnsMapping>> available = Maps.newConcurrentMap();
all.forEach((key, dnsMappings) -> {
List<DnsMapping> okList = Lists.newArrayList();
dnsMappings.forEach(dnsMapping -> {
if (checkHealth(dnsMapping.getIp(), dnsMapping.getPort())) {
okList.add(dnsMapping);
} else {
logger.warn("dns can not reachable:" + Jsons.toJson(dnsMapping));
}
});
available.put(key, okList);
});
this.update(available);
}
代码示例来源:origin: com.github.mpusher/mpush-common
@Override
public void run() {
logger.debug("do dns mapping checkHealth ...");
Map<String, List<DnsMapping>> all = this.getAll();
Map<String, List<DnsMapping>> available = Maps.newConcurrentMap();
all.forEach((key, dnsMappings) -> {
List<DnsMapping> okList = Lists.newArrayList();
dnsMappings.forEach(dnsMapping -> {
if (checkHealth(dnsMapping.getIp(), dnsMapping.getPort())) {
okList.add(dnsMapping);
} else {
logger.warn("dns can not reachable:" + Jsons.toJson(dnsMapping));
}
});
available.put(key, okList);
});
this.update(available);
}
内容来源于网络,如有侵权,请联系作者删除!