public interface DnsClient
Provides a way to asynchronous lookup informations from DNS-Servers.
Modifier and Type | Method and Description |
---|---|
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,
Handler<AsyncResult<String>> handler)
Try to lookup the A (ipv4) record for the given name.
|
DnsClient |
lookup6(String name,
Handler<AsyncResult<String>> handler)
Try to lookup the AAAA (ipv6) record 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,
Handler<AsyncResult<List<String>>> handler)
Try to resolve all AAAA (ipv6) records 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,
Handler<AsyncResult<List<MxRecord>>> handler)
Try to resolve the MX 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,
Handler<AsyncResult<String>> handler)
Try to resolve the PTR record 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,
Handler<AsyncResult<List<String>>> handler)
Try to resolve the TXT records for the given name.
|
DnsClient |
reverseLookup(String ipaddress,
Handler<AsyncResult<String>> handler)
Try to do a reverse lookup of an ipaddress.
|
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.
name
- The name to resolvehandler
- the Handler
to notify with the AsyncResult
. The AsyncResult
will get
notified with the resolved address if a record was found. If non was found it will
get notifed with null
.
If an error accours it will get failed.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.
name
- The name to resolvehandler
- the Handler
to notify with the AsyncResult
. The AsyncResult
will get
notified with the resolved Inet4Address
if a record was found. If non was found it will
get notifed with null
.
If an error accours it will get failed.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.
name
- The name to resolvehandler
- the Handler
to notify with the AsyncResult
. The AsyncResult
will get
notified with the resolved Inet6Address
if a record was found. If non was found it will
get notifed with null
.
If an error accours it will get failed.DnsClient resolveA(String name, Handler<AsyncResult<List<String>>> handler)
Try to resolve all A (ipv4) records for the given name.
name
- The name to resolvehandler
- the Handler
to notify with the AsyncResult
. The AsyncResult
will get
notified with a List
that contains all the resolved Inet4Address
es. If non was found
and empty List
will be used.
If an error accours it will get failed.DnsClient resolveAAAA(String name, Handler<AsyncResult<List<String>>> handler)
Try to resolve all AAAA (ipv6) records for the given name.
name
- The name to resolvehandler
- the Handler
to notify with the AsyncResult
. The AsyncResult
will get
notified with a List
that contains all the resolved Inet6Address
es. If non was found
and empty List
will be used.
If an error accours it will get failed.DnsClient resolveCNAME(String name, Handler<AsyncResult<List<String>>> handler)
Try to resolve the CNAME record for the given name.
name
- The name to resolve the CNAME forhandler
- the Handler
to notify with the AsyncResult
. The AsyncResult
will get
notified with the resolved String
if a record was found. If non was found it will
get notified with null
.
If an error accours it will get failed.DnsClient resolveMX(String name, Handler<AsyncResult<List<MxRecord>>> handler)
Try to resolve the MX records for the given name.
name
- The name for which the MX records should be resolvedhandler
- the Handler
to notify with the AsyncResult
. The AsyncResult
will get
notified with a List that contains all resolved MxRecord
s, sorted by their
MxRecord.priority()
. If non was found it will get notified with an empty List
If an error accours it will get failed.DnsClient resolveTXT(String name, Handler<AsyncResult<List<String>>> handler)
Try to resolve the TXT records for the given name.
name
- The name for which the TXT records should be resolvedhandler
- the Handler
to notify with the AsyncResult
. The AsyncResult
will get
notified with a List that contains all resolved String
s. If non was found it will
get notified with an empty List
If an error accours it will get failed.DnsClient resolvePTR(String name, Handler<AsyncResult<String>> handler)
Try to resolve the PTR record for the given name.
name
- The name to resolve the PTR forhandler
- the Handler
to notify with the AsyncResult
. The AsyncResult
will get
notified with the resolved String
if a record was found. If non was found it will
get notified with null
.
If an error accours it will get failed.DnsClient resolveNS(String name, Handler<AsyncResult<List<String>>> handler)
Try to resolve the NS records for the given name.
name
- The name for which the NS records should be resolvedhandler
- the Handler
to notify with the AsyncResult
. The AsyncResult
will get
notified with a List that contains all resolved String
s. If non was found it will
get notified with an empty List
If an error accours it will get failed.DnsClient resolveSRV(String name, Handler<AsyncResult<List<SrvRecord>>> handler)
Try to resolve the SRV records for the given name.
name
- The name for which the SRV records should be resolvedhandler
- the Handler
to notify with the AsyncResult
. The AsyncResult
will get
notified with a List that contains all resolved SrvRecord
s. If non was found it will
get notified with an empty List
If an error accours it will get failed.DnsClient reverseLookup(String ipaddress, Handler<AsyncResult<String>> handler)
Try to do a reverse lookup of an ipaddress. This is basically the same as doing trying to resolve a PTR record but allows you to just pass in the ipaddress and not a valid ptr query string.
ipaddress
- The ipaddress to resolve the PTR forhandler
- the Handler
to notify with the AsyncResult
. The AsyncResult
will get
notified with the resolved String
if a record was found. If non was found it will
get notified with null
.
If an error accours it will get failed.Copyright © 2014. All Rights Reserved.