com.groupbyinc.flux.common.network.NetworkUtils.class Maven / Gradle / Ivy
???? 43 /com/groupbyinc/flux/common/network/NetworkUtils java/lang/Object NetworkUtils.java 1com/groupbyinc/flux/common/network/NetworkUtils$2 1com/groupbyinc/flux/common/network/NetworkUtils$1 %java/lang/invoke/MethodHandles$Lookup
java/lang/invoke/MethodHandles Lookup PREFER_V6 Z Ljava/lang/Deprecated; SUPPORTS_V6 ()V
this 1Lcom/groupbyinc/flux/common/network/NetworkUtils; sortKey (Ljava/net/InetAddress;Z)I java/net/InetAddress
getAddress ()[B
isAnyLocalAddress ()Z ! "
# isMulticastAddress % "
& isLoopbackAddress ( "
) isLinkLocalAddress + "
, isSiteLocalAddress . "
/ address Ljava/net/InetAddress; prefer_v6 key I
sortAddresses (Ljava/util/List;)V
java/util/Collections 9 sort )(Ljava/util/List;Ljava/util/Comparator;)V ; <
: = list (Ljava/util/List; Ljava/util/List;
getInterfaces ()Ljava/util/List; java/net/SocketException D java/util/ArrayList F
G java/net/NetworkInterface I getNetworkInterfaces ()Ljava/util/Enumeration; K L
J M .(Ljava/util/Enumeration;)Ljava/util/ArrayList; ? O
: P addAllInterfaces #(Ljava/util/List;Ljava/util/List;)V R S
T
all -Ljava/util/List; java/util/List Y isEmpty [ " Z \ addAll (Ljava/util/Collection;)Z ^ _ Z ` iterator ()Ljava/util/Iterator; b c Z d java/util/Iterator f hasNext h " g i next ()Ljava/lang/Object; k l g m getSubInterfaces o L
J p intf Ljava/net/NetworkInterface; target level defaultReuseAddress 7com/groupbyinc/flux/common/apache/lucene/util/Constants w WINDOWS y x z getLoopbackAddresses ()[Ljava/net/InetAddress; B C
~ isUp ? "
J ? getInetAddresses ? L
J ?
G d add (Ljava/lang/Object;)Z ? ? Z ? "java/lang/IllegalArgumentException ? java/lang/StringBuilder ?
? 0No up-and-running loopback addresses found, got ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? -(Ljava/lang/Object;)Ljava/lang/StringBuilder; ? ?
? ? toString ()Ljava/lang/String; ? ?
? ? (Ljava/lang/String;)V ?
? ? size ()I ? ? Z ? toArray (([Ljava/lang/Object;)[Ljava/lang/Object; ? ? Z ? [Ljava/net/InetAddress; ? getSiteLocalAddresses