public class SRV extends Data implements Comparable<SRV>
| Modifier and Type | Field and Description |
|---|---|
int |
port
The target port.
|
int |
priority
The priority of this service.
|
DnsName |
target
The target server.
|
int |
weight
The weight of this service.
|
| Constructor and Description |
|---|
SRV(int priority,
int weight,
int port,
DnsName name) |
SRV(int priority,
int weight,
int port,
String name) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(SRV other) |
Record.TYPE |
getType()
The payload type.
|
boolean |
isServiceAvailable()
Check if the service is available at this domain.
|
static SRV |
parse(DataInputStream dis,
byte[] data) |
void |
serialize(DataOutputStream dos)
The internal method used to serialize Data subclasses.
|
String |
toString() |
equals, hashCode, length, toByteArray, toOutputStream, toOutputStreampublic final int port
public final int priority
public final DnsName target
public final int weight
public SRV(int priority,
int weight,
int port,
DnsName name)
public SRV(int priority,
int weight,
int port,
String name)
public int compareTo(SRV other)
compareTo in interface Comparable<SRV>public Record.TYPE getType()
Datapublic boolean isServiceAvailable()
A Target of "." means that the service is decidedly not available at this domain.
public static SRV parse(DataInputStream dis, byte[] data) throws IOException
IOExceptionpublic void serialize(DataOutputStream dos) throws IOException
Dataserialize in class Datados - the output stream to serialize to.IOException - if an I/O error occurs.