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.String
getName()
The name of the target server.int
getPort()
The target port of this service.int
getPriority()
The priority of this service.Record.TYPE
getType()
The payload type.int
getWeight()
The weight of this service.void
parse(java.io.DataInputStream dis, byte[] data, int length)
Parse this payload.void
setName(java.lang.String name)
Set the name of the target server.void
setPort(int port)
Set the target port of this service.void
setPriority(int priority)
Set the priority of this service entry.void
setWeight(int weight)
Set the weight of this service.byte[]
toByteArray()
Binary representation of this payload.java.lang.String
toString()
-
-
-
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:Data
Binary representation of this payload.- Specified by:
toByteArray
in interfaceData
- Returns:
- The binary representation of this payload.
-
parse
public void parse(java.io.DataInputStream dis, byte[] data, int length) throws java.io.IOException
Description copied from interface:Data
Parse this payload.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getType
public Record.TYPE getType()
Description copied from interface:Data
The payload type.
-
-