public class DNSEntry extends Object
Constructor and Description |
---|
DNSEntry(String hostname,
String ip)
Constructs DNS entry with hostname and IP to which it resolves.
|
DNSEntry(String hostname,
String[] ips)
Constructs DNS entry with hostname and multiple IP to which it resolves.
|
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.
|
DNSEntry(String hostname,
String dnsResultHost,
String[] ips,
int port,
long ttl,
int priority,
int weight)
Constructs complete SRV DNS entry.
|
DNSEntry(String hostname,
String dnsResultHost,
String ip,
int port,
long ttl,
int priority,
int weight)
Constructs complete SRV DNS entry.
|
Modifier and Type | Method and Description |
---|---|
String |
getDnsResultHost()
Returns the domain name for which this record is valid
|
String |
getHostname()
Returns the canonical hostname of the machine providing the service.
|
String |
getIp()
Returns
IP address of the machine providing the service. |
String[] |
getIps()
Returns array containing all
IP addresses on which service is available (in case hostname resolves to multiple IPs) |
int |
getPort()
Returns the TCP or UDP port on which the service is to be found
|
int |
getPriority()
Returns the priority of the target host, lower value means more preferred.
|
long |
getTtl()
Returns standard DNS time to live field.
|
int |
getWeight()
Returns relative weight for records with the same priority.
|
String |
toString()
Returns string interpretation of the DNS entry
|
public DNSEntry(String hostname, String ip)
hostname
- the domain name for which this record is validip
- IP address
of the machine providing the service.public DNSEntry(String hostname, String[] ips)
hostname
- the domain name for which this record is validips
- Array of all IP addresses
on which target host provide service.public DNSEntry(String hostname, String ip, int port)
hostname
- the domain name for which this record is validip
- IP address
of the machine providing the service.port
- the TCP or UDP port on which the service is to be foundpublic DNSEntry(String hostname, String dnsResultHost, String ip, int port, long ttl, int priority, int weight)
hostname
- the domain name for which this record is validdnsResultHost
- 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 foundttl
- 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.public DNSEntry(String hostname, String dnsResultHost, String[] ips, int port, long ttl, int priority, int weight)
hostname
- the domain name for which this record is validdnsResultHost
- 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 foundttl
- 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.public String getDnsResultHost()
public String getHostname()
public String getIp()
IP address
of the machine providing the service.IP address
of the machine providing the service.public String[] getIps()
IP addresses
on which service is available (in case hostname resolves to multiple IPs)IP addresses
on which service is availablepublic int getPort()
public int getPriority()
public long getTtl()
public int getWeight()
Copyright © 2017 "Tigase, Inc.". All rights reserved.