aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de')
-rw-r--r--src/main/java/de/measite/minidns/Client.java8
-rw-r--r--src/main/java/de/measite/minidns/DNSMessage.java5
-rw-r--r--src/main/java/de/measite/minidns/LRUCache.java2
-rw-r--r--src/main/java/de/measite/minidns/Record.java8
4 files changed, 18 insertions, 5 deletions
diff --git a/src/main/java/de/measite/minidns/Client.java b/src/main/java/de/measite/minidns/Client.java
index 462d52ff..827aa772 100644
--- a/src/main/java/de/measite/minidns/Client.java
+++ b/src/main/java/de/measite/minidns/Client.java
@@ -75,7 +75,7 @@ public class Client {
* @param clazz The class of the request (usually IN for Internet).
* @param host The DNS server host.
* @param port The DNS server port.
- * @return
+ * @return The response (or null on timeout / failure).
* @throws IOException On IO Errors.
*/
public DNSMessage query(String name, TYPE type, CLASS clazz, String host, int port)
@@ -91,7 +91,7 @@ public class Client {
* @param type The DNS type to request (SRV, A, AAAA, ...).
* @param clazz The class of the request (usually IN for Internet).
* @param host The DNS server host.
- * @return
+ * @return The response (or null on timeout / failure).
* @throws IOException On IO Errors.
*/
public DNSMessage query(String name, TYPE type, CLASS clazz, String host)
@@ -106,6 +106,7 @@ public class Client {
* @param name The DNS name to request.
* @param type The DNS type to request (SRV, A, AAAA, ...).
* @param clazz The class of the request (usually IN for Internet).
+ * @return The response (or null on timeout/error).
* @return The DNSMessage reply or null.
*/
public DNSMessage query(String name, TYPE type, CLASS clazz)
@@ -118,6 +119,7 @@ public class Client {
* Query a specific server for one entry.
* @param q The question section of the DNS query.
* @param host The dns server host.
+ * @return The response (or null on timeout/error).
* @throws IOException On IOErrors.
*/
public DNSMessage query(Question q, String host) throws IOException {
@@ -129,6 +131,7 @@ public class Client {
* @param q The question section of the DNS query.
* @param host The dns server host.
* @param port the dns port.
+ * @return The response (or null on timeout/error).
* @throws IOException On IOErrors.
*/
public DNSMessage query(Question q, String host, int port) throws IOException {
@@ -167,6 +170,7 @@ public class Client {
/**
* Query the system DNS server for one entry.
* @param q The question section of the DNS query.
+ * @return The response (or null on timeout/error).
*/
public DNSMessage query(Question q) {
// While this query method does in fact re-use query(Question, String)
diff --git a/src/main/java/de/measite/minidns/DNSMessage.java b/src/main/java/de/measite/minidns/DNSMessage.java
index 6e0ae6c8..fbee3b19 100644
--- a/src/main/java/de/measite/minidns/DNSMessage.java
+++ b/src/main/java/de/measite/minidns/DNSMessage.java
@@ -48,7 +48,7 @@ public class DNSMessage {
/**
* Retrieve the byte value of the response code.
- * @return
+ * @return the response code.
*/
public byte getValue() {
return (byte) value;
@@ -219,6 +219,7 @@ public class DNSMessage {
/**
* Get the receive timestamp if this message was created via parse.
* This should be used to evaluate TTLs.
+ * @return The receive timestamp in milliseconds.
*/
public long getReceiveTimestamp() {
return receiveTimestamp;
@@ -331,7 +332,7 @@ public class DNSMessage {
/**
* Change the check status of this packet.
- * @param checkDisabled
+ * @param checkDisabled The new check disabled value.
*/
public void setCheckDisabled(boolean checkDisabled) {
this.checkDisabled = checkDisabled;
diff --git a/src/main/java/de/measite/minidns/LRUCache.java b/src/main/java/de/measite/minidns/LRUCache.java
index 0262e4c5..6b9bbdc1 100644
--- a/src/main/java/de/measite/minidns/LRUCache.java
+++ b/src/main/java/de/measite/minidns/LRUCache.java
@@ -60,7 +60,7 @@ public class LRUCache implements DNSCache {
/**
* Create a new LRUCache with given capacity.
- * @param capacity
+ * @param capacity The capacity of this cache.
*/
public LRUCache(final int capacity) {
this(capacity, Long.MAX_VALUE);
diff --git a/src/main/java/de/measite/minidns/Record.java b/src/main/java/de/measite/minidns/Record.java
index 58740b7d..8f8d0d0e 100644
--- a/src/main/java/de/measite/minidns/Record.java
+++ b/src/main/java/de/measite/minidns/Record.java
@@ -302,4 +302,12 @@ public class Record {
return payloadData;
}
+ /**
+ * Retrieve the record ttl.
+ * @return The record ttl.
+ */
+ public long getTtl() {
+ return ttl;
+ }
+
}