Package de.measite.minidns.record
Class SRV
- java.lang.Object
-
- de.measite.minidns.record.SRV
-
-
Constructor Summary
Constructors Constructor Description SRV()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()The name of the target server.intgetPort()The target port of this service.intgetPriority()The priority of this service.Record.TYPEgetType()The payload type.intgetWeight()The weight of this service.voidparse(java.io.DataInputStream dis, byte[] data, int length)Parse this payload.voidsetName(java.lang.String name)Set the name of the target server.voidsetPort(int port)Set the target port of this service.voidsetPriority(int priority)Set the priority of this service entry.voidsetWeight(int weight)Set the weight of this service.byte[]toByteArray()Binary representation of this payload.java.lang.StringtoString()
-
-
-
Method Detail
-
getPriority
public int getPriority()
The priority of this service. Lower values mean higher priority.- Returns:
- The priority.
-
setPriority
public void setPriority(int priority)
Set the priority of this service entry. Lower values have higher priority.- Parameters:
priority- The new priority.
-
getWeight
public int getWeight()
The weight of this service. Services with the same priority should be balanced based on weight.- Returns:
- The weight of this service.
-
setWeight
public void setWeight(int weight)
Set the weight of this service.- Parameters:
weight- The new weight of this service.
-
getPort
public int getPort()
The target port of this service.- Returns:
- The target port of this service.
-
setPort
public void setPort(int port)
Set the target port of this service.- Parameters:
port- The new target port.
-
getName
public java.lang.String getName()
The name of the target server.- Returns:
- The target servers name.
-
setName
public void setName(java.lang.String name)
Set the name of the target server.- Parameters:
name- The new target servers name.
-
toByteArray
public byte[] toByteArray()
Description copied from interface:DataBinary representation of this payload.- Specified by:
toByteArrayin interfaceData- Returns:
- The binary representation of this payload.
-
parse
public void parse(java.io.DataInputStream dis, byte[] data, int length) throws java.io.IOExceptionDescription copied from interface:DataParse this payload.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getType
public Record.TYPE getType()
Description copied from interface:DataThe payload type.
-
-