Class: DnsClient

jala.DnsClient(nameServer)

This is a wrapper around the Dns Client by wonderly.org providing methods for querying Dns servers. For more information about the Java DNS client visit https://javadns.dev.java.net/. Please mind that the nameserver specified must accept queries on port 53 TCP (the Java DNS client used doesn't support UDP nameserver queries), and that reverse lookups are not supported.

Constructor

new DnsClient(nameServer)

Constructs a new DnsClient object.
Parameters:
Name Type Description
nameServer String IP-Address or FQDN of nameserver to query
Source:

Classes

Record

Members

(static, readonly) TYPE_A :Number

The "A" record/query type.
Type:
  • Number
Source:

(static, readonly) TYPE_CNAME :Number

The "CNAME" record/query type.
Type:
  • Number
Source:

(static, readonly) TYPE_MX :Number

The "MX" record/query type.
Type:
  • Number
Source:

(static, readonly) TYPE_NS :Number

The "NS" record/query type.
Type:
  • Number
Source:

(static, readonly) TYPE_PTR :Number

The "PTR" record/query type.
Type:
  • Number
Source:

(static, readonly) TYPE_SOA :Number

The "SOA" record/query type.
Type:
  • Number
Source:

(static, readonly) TYPE_TXT :Number

The "TXT" record/query type.
Type:
  • Number
Source:

(static, readonly) TYPE_WKS :Number

The "WKS" record/query type.
Type:
  • Number
Source:

nameServer :String

Contains the IP Adress/FQDN of the name server to query.
Type:
  • String
Source:

Methods

query(dName, queryType)

Queries the nameserver for a specific domain and the given type of record.
Parameters:
Name Type Description
dName String The domain name to query for
queryType Number The type of records to retrieve
Source:
Returns:
The records retrieved from the nameserver

queryMailHost(dName)

Convenience method to query for the MX-records of the domain passed as argument.
Parameters:
Name Type Description
dName String The domain name to query for
Source:
Returns:
The records retrieved from the nameserver