- java.lang.Object
-
- io.netty5.resolver.DefaultHostsFileEntriesResolver
-
- All Implemented Interfaces:
HostsFileEntriesResolver
public final class DefaultHostsFileEntriesResolver extends Object implements HostsFileEntriesResolver
DefaultHostsFileEntriesResolverthat resolves hosts file entries only once.
-
-
Field Summary
-
Fields inherited from interface io.netty5.resolver.HostsFileEntriesResolver
DEFAULT
-
-
Constructor Summary
Constructors Constructor Description DefaultHostsFileEntriesResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InetAddressaddress(String inetHost, ResolvedAddressTypes resolvedAddressTypes)Resolve the address of a hostname against the entries in a hosts file, depending on some address types.List<InetAddress>addresses(String inetHost, ResolvedAddressTypes resolvedAddressTypes)Resolves all addresses of a hostname against the entries in a hosts file, depending on the specifiedResolvedAddressTypes.
-
-
-
Method Detail
-
address
public InetAddress address(String inetHost, ResolvedAddressTypes resolvedAddressTypes)
Description copied from interface:HostsFileEntriesResolverResolve the address of a hostname against the entries in a hosts file, depending on some address types.- Specified by:
addressin interfaceHostsFileEntriesResolver- Parameters:
inetHost- the hostname to resolveresolvedAddressTypes- the address types to resolve- Returns:
- the first matching address
-
addresses
public List<InetAddress> addresses(String inetHost, ResolvedAddressTypes resolvedAddressTypes)
Resolves all addresses of a hostname against the entries in a hosts file, depending on the specifiedResolvedAddressTypes.- Parameters:
inetHost- the hostname to resolveresolvedAddressTypes- the address types to resolve- Returns:
- all matching addresses or
nullin case the hostname cannot be resolved
-
-