Class NettyResolverContext
- java.lang.Object
-
- org.opennms.netmgt.dnsresolver.netty.NettyResolverContext
-
- All Implemented Interfaces:
DnsResolver
public class NettyResolverContext extends Object implements DnsResolver
Asynchronous resolution using Netty. Managed by theNettyDnsResolver
.- Author:
- jwhite
-
-
Constructor Summary
Constructors Constructor Description NettyResolverContext(NettyDnsResolver parent, ExtendedDnsCache cache, io.github.resilience4j.bulkhead.Bulkhead bulkhead, int idx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
void
init()
CompletableFuture<Optional<InetAddress>>
lookup(String hostname)
Perform a DNS lookup for the given hostname.CompletableFuture<Optional<String>>
reverseLookup(InetAddress inetAddress)
Perform a reverse DNS lookup for the given IP address.
-
-
-
Constructor Detail
-
NettyResolverContext
public NettyResolverContext(NettyDnsResolver parent, ExtendedDnsCache cache, io.github.resilience4j.bulkhead.Bulkhead bulkhead, int idx)
-
-
Method Detail
-
init
public void init()
-
destroy
public void destroy()
-
lookup
public CompletableFuture<Optional<InetAddress>> lookup(String hostname)
Description copied from interface:DnsResolver
Perform a DNS lookup for the given hostname. Returns a future that contains the lookup results. If the optional is empty the lookup was completed but no result was found.- Specified by:
lookup
in interfaceDnsResolver
- Parameters:
hostname
- hostname to lookup- Returns:
- a future
-
reverseLookup
public CompletableFuture<Optional<String>> reverseLookup(InetAddress inetAddress)
Description copied from interface:DnsResolver
Perform a reverse DNS lookup for the given IP address. Returns a future that contains the lookup results. If the optional is empty the lookup was completed but no result was found.- Specified by:
reverseLookup
in interfaceDnsResolver
- Parameters:
inetAddress
- IP address to lookup- Returns:
- a future
-
-