Package io.vertx.reactivex.core.dns
Class DnsClient
- java.lang.Object
-
- io.vertx.reactivex.core.dns.DnsClient
-
public class DnsClient extends Object
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 theoriginal
non RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<DnsClient>
__TYPE_ARG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close the client.void
close(Handler<AsyncResult<Void>> handler)
Close the client.boolean
equals(Object o)
DnsClient
getDelegate()
int
hashCode()
DnsClient
lookup(String name)
Try to lookup the A (ipv4) or AAAA (ipv6) record for the given name.DnsClient
lookup(String name, Handler<AsyncResult<String>> handler)
Try to lookup the A (ipv4) or AAAA (ipv6) record for the given name.DnsClient
lookup4(String name)
Try to lookup the A (ipv4) record for the given name.DnsClient
lookup4(String name, Handler<AsyncResult<String>> handler)
Try to lookup the A (ipv4) record for the given name.DnsClient
lookup6(String name)
Try to lookup the AAAA (ipv6) record for the given name.DnsClient
lookup6(String name, Handler<AsyncResult<String>> handler)
Try to lookup the AAAA (ipv6) record for the given name.static DnsClient
newInstance(DnsClient arg)
DnsClient
resolveA(String name)
Try to resolve all A (ipv4) records for the given name.DnsClient
resolveA(String name, Handler<AsyncResult<List<String>>> handler)
Try to resolve all A (ipv4) records for the given name.DnsClient
resolveAAAA(String name)
Try to resolve all AAAA (ipv6) records for the given name.DnsClient
resolveAAAA(String name, Handler<AsyncResult<List<String>>> handler)
Try to resolve all AAAA (ipv6) records for the given name.DnsClient
resolveCNAME(String name)
Try to resolve the CNAME record for the given name.DnsClient
resolveCNAME(String name, Handler<AsyncResult<List<String>>> handler)
Try to resolve the CNAME record for the given name.DnsClient
resolveMX(String name)
Try to resolve the MX records for the given name.DnsClient
resolveMX(String name, Handler<AsyncResult<List<MxRecord>>> handler)
Try to resolve the MX records for the given name.DnsClient
resolveNS(String name)
Try to resolve the NS records for the given name.DnsClient
resolveNS(String name, Handler<AsyncResult<List<String>>> handler)
Try to resolve the NS records for the given name.DnsClient
resolvePTR(String name)
Try to resolve the PTR record for the given name.DnsClient
resolvePTR(String name, Handler<AsyncResult<String>> handler)
Try to resolve the PTR record for the given name.DnsClient
resolveSRV(String name)
Try to resolve the SRV records for the given name.DnsClient
resolveSRV(String name, Handler<AsyncResult<List<SrvRecord>>> handler)
Try to resolve the SRV records for the given name.DnsClient
resolveTXT(String name)
Try to resolve the TXT records for the given name.DnsClient
resolveTXT(String name, Handler<AsyncResult<List<String>>> handler)
Try to resolve the TXT records for the given name.DnsClient
reverseLookup(String ipaddress)
Try to do a reverse lookup of an IP address.DnsClient
reverseLookup(String ipaddress, Handler<AsyncResult<String>> handler)
Try to do a reverse lookup of an IP address.io.reactivex.Completable
rxClose()
Close the client.io.reactivex.Maybe<String>
rxLookup(String name)
Try to lookup the A (ipv4) or AAAA (ipv6) record for the given name.io.reactivex.Maybe<String>
rxLookup4(String name)
Try to lookup the A (ipv4) record for the given name.io.reactivex.Maybe<String>
rxLookup6(String name)
Try to lookup the AAAA (ipv6) record for the given name.io.reactivex.Single<List<String>>
rxResolveA(String name)
Try to resolve all A (ipv4) records for the given name.io.reactivex.Single<List<String>>
rxResolveAAAA(String name)
Try to resolve all AAAA (ipv6) records for the given name.io.reactivex.Single<List<String>>
rxResolveCNAME(String name)
Try to resolve the CNAME record for the given name.io.reactivex.Single<List<MxRecord>>
rxResolveMX(String name)
Try to resolve the MX records for the given name.io.reactivex.Single<List<String>>
rxResolveNS(String name)
Try to resolve the NS records for the given name.io.reactivex.Maybe<String>
rxResolvePTR(String name)
Try to resolve the PTR record for the given name.io.reactivex.Single<List<SrvRecord>>
rxResolveSRV(String name)
Try to resolve the SRV records for the given name.io.reactivex.Single<List<String>>
rxResolveTXT(String name)
Try to resolve the TXT records for the given name.io.reactivex.Maybe<String>
rxReverseLookup(String ipaddress)
Try to do a reverse lookup of an IP address.String
toString()
-
-
-
Method Detail
-
getDelegate
public DnsClient getDelegate()
-
lookup
public DnsClient lookup(String name, Handler<AsyncResult<String>> handler)
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 resolvehandler
- theHandler
to notify with theAsyncResult
. The handler will get notified with the resolved address if a record was found. If non was found it will get notifed withnull
. If an error accours it will get failed.- Returns:
- a reference to this, so the API can be used fluently
-
lookup
public DnsClient 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 reference to this, so the API can be used fluently
-
rxLookup
public io.reactivex.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 reference to this, so the API can be used fluently
-
lookup4
public DnsClient lookup4(String name, Handler<AsyncResult<String>> handler)
Try to lookup the A (ipv4) record for the given name. The first found will be used.- Parameters:
name
- the name to resolvehandler
- the to notify with theAsyncResult
. The handler will get notified with the resolvedInet4Address
if a record was found. If non was found it will get notifed withnull
. If an error accours it will get failed.- Returns:
- a reference to this, so the API can be used fluently
-
lookup4
public DnsClient 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 reference to this, so the API can be used fluently
-
rxLookup4
public io.reactivex.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 reference to this, so the API can be used fluently
-
lookup6
public DnsClient lookup6(String name, Handler<AsyncResult<String>> handler)
Try to lookup the AAAA (ipv6) record for the given name. The first found will be used.- Parameters:
name
- the name to resolvehandler
- the to notify with the . The handler will get notified with the resolvedInet6Address
if a record was found. If non was found it will get notifed withnull
. If an error accours it will get failed.- Returns:
- a reference to this, so the API can be used fluently
-
lookup6
public DnsClient 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 reference to this, so the API can be used fluently
-
rxLookup6
public io.reactivex.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 reference to this, so the API can be used fluently
-
resolveA
public DnsClient resolveA(String name, Handler<AsyncResult<List<String>>> handler)
Try to resolve all A (ipv4) records for the given name.- Parameters:
name
- the name to resolvehandler
- theHandler
to notify with theAsyncResult
. The handler will get notified with aList
that contains all the resolvedInet4Address
es. If none was found an emptyList
will be used. If an error accours it will get failed.- Returns:
- a reference to this, so the API can be used fluently
-
resolveA
public DnsClient resolveA(String name)
Try to resolve all A (ipv4) records for the given name.- Parameters:
name
- the name to resolve- Returns:
- a reference to this, so the API can be used fluently
-
rxResolveA
public io.reactivex.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 reference to this, so the API can be used fluently
-
resolveAAAA
public DnsClient resolveAAAA(String name, Handler<AsyncResult<List<String>>> handler)
Try to resolve all AAAA (ipv6) records for the given name.- Parameters:
name
- the name to resolvehandler
- theHandler
to notify with theAsyncResult
. The handler will get notified with aList
that contains all the resolvedInet6Address
es. If none was found an emptyList
will be used. If an error accours it will get failed.- Returns:
- a reference to this, so the API can be used fluently
-
resolveAAAA
public DnsClient resolveAAAA(String name)
Try to resolve all AAAA (ipv6) records for the given name.- Parameters:
name
- the name to resolve- Returns:
- a reference to this, so the API can be used fluently
-
rxResolveAAAA
public io.reactivex.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 reference to this, so the API can be used fluently
-
resolveCNAME
public DnsClient resolveCNAME(String name, Handler<AsyncResult<List<String>>> handler)
Try to resolve the CNAME record for the given name.- Parameters:
name
- the name to resolve the CNAME forhandler
- the to notify with the . The handler will get notified with the resolvedString
if a record was found. If none was found it will get notified withnull
. If an error accours it will get failed.- Returns:
- a reference to this, so the API can be used fluently.
-
resolveCNAME
public DnsClient resolveCNAME(String name)
Try to resolve the CNAME record for the given name.- Parameters:
name
- the name to resolve the CNAME for- Returns:
- a reference to this, so the API can be used fluently.
-
rxResolveCNAME
public io.reactivex.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 reference to this, so the API can be used fluently.
-
resolveMX
public DnsClient resolveMX(String name, Handler<AsyncResult<List<MxRecord>>> handler)
Try to resolve the MX records for the given name.- Parameters:
name
- the name for which the MX records should be resolvedhandler
- theHandler
to notify with theAsyncResult
. The handler will get notified with a List that contains all resolvedMxRecord
s, sorted by theirMxRecord.priority()
. If non was found it will get notified with an emptyList
. If an error accours it will get failed.- Returns:
- a reference to this, so the API can be used fluently.
-
resolveMX
public DnsClient resolveMX(String name)
Try to resolve the MX records for the given name.- Parameters:
name
- the name for which the MX records should be resolved- Returns:
- a reference to this, so the API can be used fluently.
-
rxResolveMX
public io.reactivex.Single<List<MxRecord>> rxResolveMX(String name)
Try to resolve the MX records for the given name.- Parameters:
name
- the name for which the MX records should be resolved- Returns:
- a reference to this, so the API can be used fluently.
-
resolveTXT
public DnsClient resolveTXT(String name, Handler<AsyncResult<List<String>>> handler)
Try to resolve the TXT records for the given name.- Parameters:
name
- the name for which the TXT records should be resolvedhandler
- the to notify with the . The handler will get notified with a List that contains all resolvedString
s. If none was found it will get notified with an emptyList
. If an error accours it will get failed.- Returns:
- a reference to this, so the API can be used fluently.
-
resolveTXT
public DnsClient resolveTXT(String name)
Try to resolve the TXT records for the given name.- Parameters:
name
- the name for which the TXT records should be resolved- Returns:
- a reference to this, so the API can be used fluently.
-
rxResolveTXT
public io.reactivex.Single<List<String>> rxResolveTXT(String name)
Try to resolve the TXT records for the given name.- Parameters:
name
- the name for which the TXT records should be resolved- Returns:
- a reference to this, so the API can be used fluently.
-
resolvePTR
public DnsClient resolvePTR(String name, Handler<AsyncResult<String>> handler)
Try to resolve the PTR record for the given name.- Parameters:
name
- the name to resolve the PTR forhandler
- the to notify with the . The handler will get notified with the resolvedString
if a record was found. If none was found it will get notified withnull
. If an error accours it will get failed.- Returns:
- a reference to this, so the API can be used fluently.
-
resolvePTR
public DnsClient resolvePTR(String name)
Try to resolve the PTR record for the given name.- Parameters:
name
- the name to resolve the PTR for- Returns:
- a reference to this, so the API can be used fluently.
-
rxResolvePTR
public io.reactivex.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 reference to this, so the API can be used fluently.
-
resolveNS
public DnsClient resolveNS(String name, Handler<AsyncResult<List<String>>> handler)
Try to resolve the NS records for the given name.- Parameters:
name
- the name for which the NS records should be resolvedhandler
- the to notify with the . The handler will get notified with a List that contains all resolvedString
s. If none was found it will get notified with an emptyList
. If an error accours it will get failed.- Returns:
- a reference to this, so the API can be used fluently.
-
resolveNS
public DnsClient resolveNS(String name)
Try to resolve the NS records for the given name.- Parameters:
name
- the name for which the NS records should be resolved- Returns:
- a reference to this, so the API can be used fluently.
-
rxResolveNS
public io.reactivex.Single<List<String>> rxResolveNS(String name)
Try to resolve the NS records for the given name.- Parameters:
name
- the name for which the NS records should be resolved- Returns:
- a reference to this, so the API can be used fluently.
-
resolveSRV
public DnsClient resolveSRV(String name, Handler<AsyncResult<List<SrvRecord>>> handler)
Try to resolve the SRV records for the given name.- Parameters:
name
- the name for which the SRV records should be resolvedhandler
- the to notify with the . The handler will get notified with a List that contains all resolvedSrvRecord
s. If none was found it will get notified with an emptyList
. If an error accours it will get failed.- Returns:
- a reference to this, so the API can be used fluently.
-
resolveSRV
public DnsClient resolveSRV(String name)
Try to resolve the SRV records for the given name.- Parameters:
name
- the name for which the SRV records should be resolved- Returns:
- a reference to this, so the API can be used fluently.
-
rxResolveSRV
public io.reactivex.Single<List<SrvRecord>> rxResolveSRV(String name)
Try to resolve the SRV records for the given name.- Parameters:
name
- the name for which the SRV records should be resolved- Returns:
- a reference to this, so the API can be used fluently.
-
reverseLookup
public DnsClient reverseLookup(String ipaddress, Handler<AsyncResult<String>> handler)
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 forhandler
- the to notify with the . The handler will get notified with the resolvedString
if a record was found. If none was found it will get notified withnull
. If an error accours it will get failed.- Returns:
- a reference to this, so the API can be used fluently.
-
reverseLookup
public DnsClient 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 reference to this, so the API can be used fluently.
-
rxReverseLookup
public io.reactivex.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 reference to this, so the API can be used fluently.
-
close
public void close(Handler<AsyncResult<Void>> handler)
Close the client.- Parameters:
handler
-
-
close
public void close()
Close the client.
-
rxClose
public io.reactivex.Completable rxClose()
Close the client.- Returns:
-
-