DNSEntry¶
-
public class
DNSEntry
implements Comparable<DNSEntry>¶ The class defines an instance of a single DNS entry.
Author: Artur Hefczyc
Constructors¶
DNSEntry¶
DNSEntry¶
DNSEntry¶
-
public
DNSEntry
(String hostname, String ip, int port)¶ Constructs DNS entry with hostname, IP to which it resolves and a default port number used for connections.
Parameters: - hostname – the domain name for which this record is valid
- ip –
IP address
of the machine providing the service. - port – the TCP or UDP port on which the service is to be found
DNSEntry¶
-
public
DNSEntry
(String hostname, String[] ips, int port)¶ Constructs DNS entry with hostname, IPs to which it resolves and a default port number used for connections.
Parameters: - hostname – the domain name for which this record is valid
- ips –
IP addresses
of the machines providing the service. - port – the TCP or UDP port on which the service is to be found
DNSEntry¶
-
public
DNSEntry
(String hostname, String dnsResultHost, String ip, int port, long ttl, int priority, int weight)¶ Constructs complete SRV DNS entry.
Parameters: - hostname – the domain name for which this record is valid
- dnsResultHost – the canonical hostname of the machine providing the service.
- ip –
IP address
of the machine providing the service. - port – the TCP or UDP port on which the service is to be found
- ttl – standard DNS time to live field.
- priority – the priority of the target host, lower value means more preferred.
- weight – relative weight for records with the same priority.
DNSEntry¶
-
public
DNSEntry
(String hostname, String dnsResultHost, String[] ips, int port, long ttl, int priority, int weight)¶ Constructs complete SRV DNS entry.
Parameters: - hostname – the domain name for which this record is valid
- dnsResultHost – the canonical hostname of the machine providing the service.
- ips – Array of all
IP addresses
on which target host provide service. - port – the TCP or UDP port on which the service is to be found
- ttl – standard DNS time to live field.
- priority – the priority of the target host, lower value means more preferred.
- weight – relative weight for records with the same priority.
Methods¶
getDnsResultHost¶
getHostname¶
getIp¶
getIps¶
getPort¶
-
public int
getPort
()¶ Returns the TCP or UDP port on which the service is to be found
Returns: the TCP or UDP port on which the service is to be found
getPriority¶
-
public int
getPriority
()¶ Returns the priority of the target host, lower value means more preferred.
Returns: the priority of the target host, lower value means more preferred.
getTtl¶
-
public long
getTtl
()¶ Returns standard DNS time to live field.
Returns: standard DNS time to live field.