Comparable<DNSRecordSRV>public class DNSRecordSRV extends Object implements Comparable<DNSRecordSRV>
| Constructor | Description |
|---|---|
DNSRecordSRV(int priority,
int weight,
int port,
String serverName) |
Constructs a DNSRecordSRV.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
compareTo(DNSRecordSRV o) |
|
boolean |
equals(Object other) |
|
int |
getPort() |
Returns the IP port of record.
|
int |
getPriority() |
Returns the priority of DNS SRV record.
|
String |
getServerName() |
Returns the DNS server name.
|
int |
getWeight() |
Returns the weight of DNS record from 0 to 65535.
|
int |
hashCode() |
|
static DNSRecordSRV |
parseFromDNSRecord(String record) |
Parses a DNS SRC Record from a DNS String record.
|
String |
toString() |
public DNSRecordSRV(int priority,
int weight,
int port,
String serverName)
throws IllegalArgumentException
priority - is lowestweight - 1 at minimumport - the port of serviceserverName - the hostIllegalArgumentException - if priority < 0 or weight <= 1public static DNSRecordSRV parseFromDNSRecord(String record) throws IllegalArgumentException
record - the record to parseIllegalArgumentException - if record is not correct and cannot be parsedpublic int compareTo(DNSRecordSRV o)
compareTo in interface Comparable<DNSRecordSRV>public int getPriority()
public int getWeight()
public int getPort()
public String getServerName()
Copyright © 2018 Microsoft Corporation. All rights reserved.