Class NetworkAddress
java.lang.Object
org.infinispan.commons.util.NetworkAddress
- Since:
- 10.0
- Author:
- Tristan Tarrant <tristan@infinispan.org>
-
Method Summary
Modifier and TypeMethodDescriptionstatic NetworkAddressanyAddress(String name) cidr()static StringfindInterfaceAddressMatchingInetAddress(byte[] inetAddress) static NetworkAddressfromString(String name, String value) The IP addressgetName()The name of this addressshortstatic NetworkAddressglobalAddress(String name) static NetworkAddressinetAddress(String name, String value) static booleaninetAddressMatchesInterfaceAddress(byte[] inetAddress, byte[] interfaceAddress, int prefixLength) static NetworkAddresslinkLocalAddress(String name) static NetworkAddressstatic NetworkAddressmatch(String name, Predicate<NetworkInterface> ifMatcher, Predicate<InterfaceAddress> addressMatcher) static NetworkAddressmatchAddress(String name, String regex) static NetworkAddressstatic NetworkAddressmatchInterface(String name, String regex) static NetworkAddressnonLoopback(String name) static NetworkAddresstoString()
-
Method Details
-
getName
The name of this address -
getAddress
The IP address -
cidr
-
toString
-
getPrefixLength
public short getPrefixLength() -
fromString
- Throws:
IOException
-
globalAddress
- Throws:
IOException
-
loopback
- Throws:
IOException
-
nonLoopback
- Throws:
IOException
-
siteLocal
- Throws:
IOException
-
matchInterface
- Throws:
IOException
-
matchAddress
- Throws:
IOException
-
matchHost
- Throws:
IOException
-
match
public static NetworkAddress match(String name, Predicate<NetworkInterface> ifMatcher, Predicate<InterfaceAddress> addressMatcher) throws IOException - Throws:
IOException
-
inetAddress
- Throws:
UnknownHostException
-
anyAddress
- Throws:
UnknownHostException
-
linkLocalAddress
- Throws:
IOException
-
inetAddressMatchesInterfaceAddress
public static boolean inetAddressMatchesInterfaceAddress(byte[] inetAddress, byte[] interfaceAddress, int prefixLength) -
findInterfaceAddressMatchingInetAddress
-