Package org.infinispan.server.network
Class NetworkAddress
- java.lang.Object
-
- org.infinispan.server.network.NetworkAddress
-
public class NetworkAddress extends Object
- Since:
- 10.0
- Author:
- Tristan Tarrant <tristan@infinispan.org>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NetworkAddressanyAddress(String name)Stringcidr()static NetworkAddressfromString(String name, String value)InetAddressgetAddress()The IP addressStringgetName()The name of this addressshortgetPrefixLength()static NetworkAddressglobalAddress(String name)static NetworkAddressinetAddress(String name, String value)static NetworkAddresslinkLocalAddress(String name)static NetworkAddressloopback(String name)static NetworkAddressmatch(String name, Predicate<NetworkInterface> ifMatcher, Predicate<InetAddress> addressMatcher)static NetworkAddressmatchAddress(String name, String regex)static NetworkAddressmatchHost(String name, String regex)static NetworkAddressmatchInterface(String name, String regex)static NetworkAddressnonLoopback(String name)static NetworkAddresssiteLocal(String name)StringtoString()
-
-
-
Method Detail
-
getName
public String getName()
The name of this address
-
getAddress
public InetAddress getAddress()
The IP address
-
cidr
public String cidr()
-
getPrefixLength
public short getPrefixLength()
-
fromString
public static NetworkAddress fromString(String name, String value) throws IOException
- Throws:
IOException
-
globalAddress
public static NetworkAddress globalAddress(String name) throws IOException
- Throws:
IOException
-
loopback
public static NetworkAddress loopback(String name) throws IOException
- Throws:
IOException
-
nonLoopback
public static NetworkAddress nonLoopback(String name) throws IOException
- Throws:
IOException
-
siteLocal
public static NetworkAddress siteLocal(String name) throws IOException
- Throws:
IOException
-
matchInterface
public static NetworkAddress matchInterface(String name, String regex) throws IOException
- Throws:
IOException
-
matchAddress
public static NetworkAddress matchAddress(String name, String regex) throws IOException
- Throws:
IOException
-
matchHost
public static NetworkAddress matchHost(String name, String regex) throws IOException
- Throws:
IOException
-
match
public static NetworkAddress match(String name, Predicate<NetworkInterface> ifMatcher, Predicate<InetAddress> addressMatcher) throws IOException
- Throws:
IOException
-
inetAddress
public static NetworkAddress inetAddress(String name, String value) throws UnknownHostException
- Throws:
UnknownHostException
-
anyAddress
public static NetworkAddress anyAddress(String name) throws UnknownHostException
- Throws:
UnknownHostException
-
linkLocalAddress
public static NetworkAddress linkLocalAddress(String name) throws IOException
- Throws:
IOException
-
-