- java.lang.Object
-
- inet.ipaddr.AddressNetwork.HostIdentifierStringGenerator<HostName>
-
- inet.ipaddr.IPAddressNetwork.HostNameGenerator
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- IPAddressNetwork<T extends IPAddress,R extends IPAddressSection,E extends IPAddressSection,S extends IPAddressSegment,J extends java.net.InetAddress>
public static class IPAddressNetwork.HostNameGenerator extends AddressNetwork.HostIdentifierStringGenerator<HostName>
Choose a map of your choice to implement a cache of host names and resolved addresses. The map will map string representations of the host to HostName objects. Those HostName objects in turn cache any resulting IPAddressString objects if the string represents an address, or any IPAddress objects obtained from resolving the HostName. Those objects are all themselves thread-safe, but the cache will only be thread-safe if you choose a thread-safe map such as ConcurrentHashMap.- Author:
- sfoley
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HostNameGenerator()
HostNameGenerator(HostNameParameters options)
HostNameGenerator(java.util.Map<java.lang.String,HostName> backingMap)
HostNameGenerator(java.util.Map<java.lang.String,HostName> backingMap, HostNameParameters options, boolean reverseLookup)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description HostName
get(byte[] bytes)
HostName
get(Address.AddressValueProvider addressProvider)
HostName
get(Address.SegmentValueProvider lowerValueProvider, Address.SegmentValueProvider upperValueProvider, java.lang.Integer prefixLength, java.lang.CharSequence zone)
HostName
get(IPAddress.IPVersion version, Address.SegmentValueProvider lowerValueProvider, Address.SegmentValueProvider upperValueProvider, java.lang.Integer prefixLength)
static Address.SegmentValueProvider
getValueProvider(byte[] bytes)
-
Methods inherited from class inet.ipaddr.AddressNetwork.HostIdentifierStringGenerator
contains, get, getBackingMap
-
-
-
-
Constructor Detail
-
HostNameGenerator
public HostNameGenerator(java.util.Map<java.lang.String,HostName> backingMap, HostNameParameters options, boolean reverseLookup)
-
HostNameGenerator
public HostNameGenerator(java.util.Map<java.lang.String,HostName> backingMap)
-
HostNameGenerator
public HostNameGenerator(HostNameParameters options)
-
HostNameGenerator
public HostNameGenerator()
-
-
Method Detail
-
getValueProvider
public static Address.SegmentValueProvider getValueProvider(byte[] bytes)
-
get
public HostName get(byte[] bytes)
- Specified by:
get
in classAddressNetwork.HostIdentifierStringGenerator<HostName>
-
get
public HostName get(Address.AddressValueProvider addressProvider)
- Specified by:
get
in classAddressNetwork.HostIdentifierStringGenerator<HostName>
-
get
public HostName get(IPAddress.IPVersion version, Address.SegmentValueProvider lowerValueProvider, Address.SegmentValueProvider upperValueProvider, java.lang.Integer prefixLength)
-
get
public HostName get(Address.SegmentValueProvider lowerValueProvider, Address.SegmentValueProvider upperValueProvider, java.lang.Integer prefixLength, java.lang.CharSequence zone)
-
-