public class DNSRecordSRV extends Object implements Comparable<DNSRecordSRV>
Constructor and Description |
---|
DNSRecordSRV(int priority,
int weight,
int port,
String serverName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(DNSRecordSRV o) |
boolean |
equals(Object other) |
int |
getPort()
IP port of record.
|
int |
getPriority()
Get the priority of DNS SRV record.
|
String |
getServerName()
The DNS server name.
|
int |
getWeight()
Get the weight of DNS record from 0 to 65535.
|
int |
hashCode() |
static DNSRecordSRV |
parseFromDNSRecord(String record)
Parse 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 © 2017 Microsoft Corporation. All rights reserved.