Package io.vertx.rxjava3.core.dns
Class DnsClient
- java.lang.Object
-
- io.vertx.rxjava3.core.dns.DnsClient
-
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
public class DnsClient extends Object implements io.vertx.lang.rx.RxDelegate
Provides a way to asynchronously lookup information from DNS servers.Please consult the documentation for more information on DNS clients.
The client is thread safe and can be used from any thread.
NOTE: This class has been automatically generated from the
originalnon RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static io.vertx.lang.rx.TypeArg<DnsClient>__TYPE_ARG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Completableclose()Close the client.booleanequals(Object o)DnsClientgetDelegate()inthashCode()Maybe<String>lookup(String name)Try to lookup the A (ipv4) or AAAA (ipv6) record for the given name.Maybe<String>lookup4(String name)Try to lookup the A (ipv4) record for the given name.Maybe<String>lookup6(String name)Try to lookup the AAAA (ipv6) record for the given name.static DnsClientnewInstance(DnsClient arg)Single<List<String>>resolveA(String name)Try to resolve all A (ipv4) records for the given name.Single<List<String>>resolveAAAA(String name)Try to resolve all AAAA (ipv6) records for the given name.Single<List<String>>resolveCNAME(String name)Try to resolve the CNAME record for the given name.Single<List<MxRecord>>resolveMX(String name)Try to resolve the MX records for the given name.Single<List<String>>resolveNS(String name)Try to resolve the NS records for the given name.Maybe<String>resolvePTR(String name)Try to resolve the PTR record for the given name.Single<List<SrvRecord>>resolveSRV(String name)Try to resolve the SRV records for the given name.Single<List<String>>resolveTXT(String name)Try to resolve the TXT records for the given name.Maybe<String>reverseLookup(String ipaddress)Try to do a reverse lookup of an IP address.CompletablerxClose()Close the client.Maybe<String>rxLookup(String name)Try to lookup the A (ipv4) or AAAA (ipv6) record for the given name.Maybe<String>rxLookup4(String name)Try to lookup the A (ipv4) record for the given name.Maybe<String>rxLookup6(String name)Try to lookup the AAAA (ipv6) record for the given name.Single<List<String>>rxResolveA(String name)Try to resolve all A (ipv4) records for the given name.Single<List<String>>rxResolveAAAA(String name)Try to resolve all AAAA (ipv6) records for the given name.Single<List<String>>rxResolveCNAME(String name)Try to resolve the CNAME record for the given name.Single<List<MxRecord>>rxResolveMX(String name)Try to resolve the MX records for the given name.Single<List<String>>rxResolveNS(String name)Try to resolve the NS records for the given name.Maybe<String>rxResolvePTR(String name)Try to resolve the PTR record for the given name.Single<List<SrvRecord>>rxResolveSRV(String name)Try to resolve the SRV records for the given name.Single<List<String>>rxResolveTXT(String name)Try to resolve the TXT records for the given name.Maybe<String>rxReverseLookup(String ipaddress)Try to do a reverse lookup of an IP address.StringtoString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.vertx.lang.rx.TypeArg<DnsClient> __TYPE_ARG
-
-
Method Detail
-
getDelegate
public DnsClient getDelegate()
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
lookup
public Maybe<String> lookup(String name)
Try to lookup the A (ipv4) or AAAA (ipv6) record for the given name. The first found will be used.- Parameters:
name- the name to resolve- Returns:
- a future notified with the resolved address if a record was found. If none was found it will get notified with
null. If an error occurs it will get failed.
-
rxLookup
public Maybe<String> rxLookup(String name)
Try to lookup the A (ipv4) or AAAA (ipv6) record for the given name. The first found will be used.- Parameters:
name- the name to resolve- Returns:
- a future notified with the resolved address if a record was found. If none was found it will get notified with
null. If an error occurs it will get failed.
-
lookup4
public Maybe<String> lookup4(String name)
Try to lookup the A (ipv4) record for the given name. The first found will be used.- Parameters:
name- the name to resolve- Returns:
- a future notified with the resolved
Inet4Addressif a record was found. If none was found it will get notified withnull. If an error occurs it will get failed.
-
rxLookup4
public Maybe<String> rxLookup4(String name)
Try to lookup the A (ipv4) record for the given name. The first found will be used.- Parameters:
name- the name to resolve- Returns:
- a future notified with the resolved
Inet4Addressif a record was found. If none was found it will get notified withnull. If an error occurs it will get failed.
-
lookup6
public Maybe<String> lookup6(String name)
Try to lookup the AAAA (ipv6) record for the given name. The first found will be used.- Parameters:
name- the name to resolve- Returns:
- a future notified with the resolved
Inet6Addressif a record was found. If none was found it will get notified withnull. If an error occurs it will get failed.
-
rxLookup6
public Maybe<String> rxLookup6(String name)
Try to lookup the AAAA (ipv6) record for the given name. The first found will be used.- Parameters:
name- the name to resolve- Returns:
- a future notified with the resolved
Inet6Addressif a record was found. If none was found it will get notified withnull. If an error occurs it will get failed.
-
resolveA
public Single<List<String>> resolveA(String name)
Try to resolve all A (ipv4) records for the given name.- Parameters:
name- the name to resolve- Returns:
- a future notified with a
Listthat contains all the resolvedInet4Addresses. If none was found an emptyListwill be used. If an error occurs it will get failed.
-
rxResolveA
public Single<List<String>> rxResolveA(String name)
Try to resolve all A (ipv4) records for the given name.- Parameters:
name- the name to resolve- Returns:
- a future notified with a
Listthat contains all the resolvedInet4Addresses. If none was found an emptyListwill be used. If an error occurs it will get failed.
-
resolveAAAA
public Single<List<String>> resolveAAAA(String name)
Try to resolve all AAAA (ipv6) records for the given name.- Parameters:
name- the name to resolve- Returns:
- a future notified with a
Listthat contains all the resolvedInet6Addresses. If none was found an emptyListwill be used. If an error occurs it will get failed.
-
rxResolveAAAA
public Single<List<String>> rxResolveAAAA(String name)
Try to resolve all AAAA (ipv6) records for the given name.- Parameters:
name- the name to resolve- Returns:
- a future notified with a
Listthat contains all the resolvedInet6Addresses. If none was found an emptyListwill be used. If an error occurs it will get failed.
-
resolveCNAME
public Single<List<String>> resolveCNAME(String name)
Try to resolve the CNAME record for the given name.- Parameters:
name- the name to resolve the CNAME for- Returns:
- a future notified with the resolved
Stringif a record was found. If none was found it will get notified withnull. If an error occurs it will get failed.
-
rxResolveCNAME
public Single<List<String>> rxResolveCNAME(String name)
Try to resolve the CNAME record for the given name.- Parameters:
name- the name to resolve the CNAME for- Returns:
- a future notified with the resolved
Stringif a record was found. If none was found it will get notified withnull. If an error occurs it will get failed.
-
resolveMX
public Single<List<MxRecord>> resolveMX(String name)
Try to resolve the MX records for the given name.
-
rxResolveMX
public Single<List<MxRecord>> rxResolveMX(String name)
Try to resolve the MX records for the given name.
-
resolveTXT
public Single<List<String>> resolveTXT(String name)
Try to resolve the TXT records for the given name.
-
rxResolveTXT
public Single<List<String>> rxResolveTXT(String name)
Try to resolve the TXT records for the given name.
-
resolvePTR
public Maybe<String> resolvePTR(String name)
Try to resolve the PTR record for the given name.- Parameters:
name- the name to resolve the PTR for- Returns:
- a future notified with the resolved
Stringif a record was found. If none was found it will get notified withnull. If an error occurs it will get failed.
-
rxResolvePTR
public Maybe<String> rxResolvePTR(String name)
Try to resolve the PTR record for the given name.- Parameters:
name- the name to resolve the PTR for- Returns:
- a future notified with the resolved
Stringif a record was found. If none was found it will get notified withnull. If an error occurs it will get failed.
-
resolveNS
public Single<List<String>> resolveNS(String name)
Try to resolve the NS records for the given name.
-
rxResolveNS
public Single<List<String>> rxResolveNS(String name)
Try to resolve the NS records for the given name.
-
resolveSRV
public Single<List<SrvRecord>> resolveSRV(String name)
Try to resolve the SRV records for the given name.
-
rxResolveSRV
public Single<List<SrvRecord>> rxResolveSRV(String name)
Try to resolve the SRV records for the given name.
-
reverseLookup
public Maybe<String> reverseLookup(String ipaddress)
Try to do a reverse lookup of an IP address. This is basically the same as doing trying to resolve a PTR record but allows you to just pass in the IP address and not a valid ptr query string.- Parameters:
ipaddress- the IP address to resolve the PTR for- Returns:
- a future notified with the resolved
Stringif a record was found. If none was found it will get notified withnull. If an error occurs it will get failed.
-
rxReverseLookup
public Maybe<String> rxReverseLookup(String ipaddress)
Try to do a reverse lookup of an IP address. This is basically the same as doing trying to resolve a PTR record but allows you to just pass in the IP address and not a valid ptr query string.- Parameters:
ipaddress- the IP address to resolve the PTR for- Returns:
- a future notified with the resolved
Stringif a record was found. If none was found it will get notified withnull. If an error occurs it will get failed.
-
close
public Completable close()
Close the client.- Returns:
- the future completed when the client resources have been released
-
rxClose
public Completable rxClose()
Close the client.- Returns:
- the future completed when the client resources have been released
-
-