Add missing javadoc / missing getter (getTTL)

This commit is contained in:
Rene Treffer 2014-06-23 21:02:25 +02:00
parent c57b0d3ef4
commit f9f5069e52
4 changed files with 18 additions and 5 deletions

View file

@ -75,7 +75,7 @@ public class Client {
* @param clazz The class of the request (usually IN for Internet). * @param clazz The class of the request (usually IN for Internet).
* @param host The DNS server host. * @param host The DNS server host.
* @param port The DNS server port. * @param port The DNS server port.
* @return * @return The response (or null on timeout / failure).
* @throws IOException On IO Errors. * @throws IOException On IO Errors.
*/ */
public DNSMessage query(String name, TYPE type, CLASS clazz, String host, int port) 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 type The DNS type to request (SRV, A, AAAA, ...).
* @param clazz The class of the request (usually IN for Internet). * @param clazz The class of the request (usually IN for Internet).
* @param host The DNS server host. * @param host The DNS server host.
* @return * @return The response (or null on timeout / failure).
* @throws IOException On IO Errors. * @throws IOException On IO Errors.
*/ */
public DNSMessage query(String name, TYPE type, CLASS clazz, String host) 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 name The DNS name to request.
* @param type The DNS type to request (SRV, A, AAAA, ...). * @param type The DNS type to request (SRV, A, AAAA, ...).
* @param clazz The class of the request (usually IN for Internet). * @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. * @return The DNSMessage reply or null.
*/ */
public DNSMessage query(String name, TYPE type, CLASS clazz) public DNSMessage query(String name, TYPE type, CLASS clazz)
@ -118,6 +119,7 @@ public class Client {
* Query a specific server for one entry. * Query a specific server for one entry.
* @param q The question section of the DNS query. * @param q The question section of the DNS query.
* @param host The dns server host. * @param host The dns server host.
* @return The response (or null on timeout/error).
* @throws IOException On IOErrors. * @throws IOException On IOErrors.
*/ */
public DNSMessage query(Question q, String host) throws IOException { 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 q The question section of the DNS query.
* @param host The dns server host. * @param host The dns server host.
* @param port the dns port. * @param port the dns port.
* @return The response (or null on timeout/error).
* @throws IOException On IOErrors. * @throws IOException On IOErrors.
*/ */
public DNSMessage query(Question q, String host, int port) throws IOException { 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. * Query the system DNS server for one entry.
* @param q The question section of the DNS query. * @param q The question section of the DNS query.
* @return The response (or null on timeout/error).
*/ */
public DNSMessage query(Question q) { public DNSMessage query(Question q) {
// While this query method does in fact re-use query(Question, String) // While this query method does in fact re-use query(Question, String)

View file

@ -48,7 +48,7 @@ public class DNSMessage {
/** /**
* Retrieve the byte value of the response code. * Retrieve the byte value of the response code.
* @return * @return the response code.
*/ */
public byte getValue() { public byte getValue() {
return (byte) value; return (byte) value;
@ -219,6 +219,7 @@ public class DNSMessage {
/** /**
* Get the receive timestamp if this message was created via parse. * Get the receive timestamp if this message was created via parse.
* This should be used to evaluate TTLs. * This should be used to evaluate TTLs.
* @return The receive timestamp in milliseconds.
*/ */
public long getReceiveTimestamp() { public long getReceiveTimestamp() {
return receiveTimestamp; return receiveTimestamp;
@ -331,7 +332,7 @@ public class DNSMessage {
/** /**
* Change the check status of this packet. * Change the check status of this packet.
* @param checkDisabled * @param checkDisabled The new check disabled value.
*/ */
public void setCheckDisabled(boolean checkDisabled) { public void setCheckDisabled(boolean checkDisabled) {
this.checkDisabled = checkDisabled; this.checkDisabled = checkDisabled;

View file

@ -60,7 +60,7 @@ public class LRUCache implements DNSCache {
/** /**
* Create a new LRUCache with given capacity. * Create a new LRUCache with given capacity.
* @param capacity * @param capacity The capacity of this cache.
*/ */
public LRUCache(final int capacity) { public LRUCache(final int capacity) {
this(capacity, Long.MAX_VALUE); this(capacity, Long.MAX_VALUE);

View file

@ -302,4 +302,12 @@ public class Record {
return payloadData; return payloadData;
} }
/**
* Retrieve the record ttl.
* @return The record ttl.
*/
public long getTtl() {
return ttl;
}
} }