Package com.alibaba.nacos.sys.utils
Class InetUtils
java.lang.Object
com.alibaba.nacos.sys.utils.InetUtils
Network card operation tool class.
- Author:
- Nacos
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classcom.alibaba.nacos.core.cluster.ServerMemberManageris listener. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InetAddressfindFirstNonLoopbackAddress.static Stringstatic StringGet ip address from environment System property nacos.server.ip Spring property nacos.inetutils.ip-address.static Stringstatic booleanisUp(NetworkInterface ifc) check network intreface isUp, not throw SocketException.
-
Constructor Details
-
InetUtils
public InetUtils()
-
-
Method Details
-
getNacosIp
Get ip address from environment System property nacos.server.ip Spring property nacos.inetutils.ip-address.- Returns:
- ip address
-
getSelfIP
-
findFirstNonLoopbackAddress
findFirstNonLoopbackAddress.- Returns:
InetAddress
-
isUp
check network intreface isUp, not throw SocketException.- Parameters:
ifc- network interface- Returns:
- true or false;
-
getGrpcListenIp
-