diff options
author | Rene Treffer <treffer@measite.de> | 2014-06-22 15:29:51 +0200 |
---|---|---|
committer | Rene Treffer <treffer@measite.de> | 2014-06-22 15:29:51 +0200 |
commit | 0e484dd17f85d923891460ff606b13294e8985ba (patch) | |
tree | 01b3835385c9338aec7fb9bdaf5361a25d8b5568 /src/main/java/de/measite/minidns/record/SRV.java | |
parent | 028700efe0345e764f598378cb64c5e57f980e33 (diff) |
Add missing javadoc and review new code
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/measite/minidns/record/SRV.java | 54 |
1 files changed, 52 insertions, 2 deletions
diff --git a/src/main/java/de/measite/minidns/record/SRV.java b/src/main/java/de/measite/minidns/record/SRV.java index 32b70c4d..707bf3f5 100644 --- a/src/main/java/de/measite/minidns/record/SRV.java +++ b/src/main/java/de/measite/minidns/record/SRV.java @@ -6,49 +6,99 @@ import java.io.IOException; import de.measite.minidns.Record.TYPE; import de.measite.minidns.util.NameUtil; +/** + * SRV record payload (service pointer). + */ public class SRV implements Data { + /** + * The priority of this service. + */ protected int priority; + + /** + * The weight of this service. + */ protected int weight; + + /** + * The target port. + */ protected int port; + + /** + * The target server. + */ protected String name; + /** + * The priority of this service. Lower values mean higher priority. + * @return The priority. + */ public int getPriority() { return priority; } + /** + * Set the priority of this service entry. Lower values have higher priority. + * @param priority The new priority. + */ public void setPriority(int priority) { this.priority = priority; } + /** + * The weight of this service. Services with the same priority should be + * balanced based on weight. + * @return The weight of this service. + */ public int getWeight() { return weight; } + /** + * Set the weight of this service. + * @param weight The new weight of this service. + */ public void setWeight(int weight) { this.weight = weight; } + /** + * The target port of this service. + * @return The target port of this service. + */ public int getPort() { return port; } + /** + * Set the target port of this service. + * @param port The new target port. + */ public void setPort(int port) { this.port = port; } + /** + * The name of the target server. + * @return The target servers name. + */ public String getName() { return name; } + /** + * Set the name of the target server. + * @param name The new target servers name. + */ public void setName(String name) { this.name = name; } @Override public byte[] toByteArray() { - // TODO Auto-generated method stub - return null; + throw new UnsupportedOperationException("Not implemented yet"); } @Override |