You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by er...@apache.org on 2005/01/13 03:05:31 UTC

svn commit: r125017 - /incubator/directory/dns/trunk/core/src/java/org/apache/dns/records/QuestionRecord.java /incubator/directory/dns/trunk/core/src/java/org/apache/dns/records/ResourceRecord.java

Author: erodriguez
Date: Wed Jan 12 18:05:30 2005
New Revision: 125017

URL: http://svn.apache.org/viewcvs?view=rev&rev=125017
Log:
Update to Record types to allow for encoding.
Modified:
   incubator/directory/dns/trunk/core/src/java/org/apache/dns/records/QuestionRecord.java
   incubator/directory/dns/trunk/core/src/java/org/apache/dns/records/ResourceRecord.java

Modified: incubator/directory/dns/trunk/core/src/java/org/apache/dns/records/QuestionRecord.java
Url: http://svn.apache.org/viewcvs/incubator/directory/dns/trunk/core/src/java/org/apache/dns/records/QuestionRecord.java?view=diff&rev=125017&p1=incubator/directory/dns/trunk/core/src/java/org/apache/dns/records/QuestionRecord.java&r1=125016&p2=incubator/directory/dns/trunk/core/src/java/org/apache/dns/records/QuestionRecord.java&r2=125017
==============================================================================
--- incubator/directory/dns/trunk/core/src/java/org/apache/dns/records/QuestionRecord.java	(original)
+++ incubator/directory/dns/trunk/core/src/java/org/apache/dns/records/QuestionRecord.java	Wed Jan 12 18:05:30 2005
@@ -18,6 +18,7 @@
 package org.apache.dns.records;
 
 
+
 /**
  * The question section is used to carry the "question" in most queries,
  * i.e., the parameters that define what is being asked.  The section

Modified: incubator/directory/dns/trunk/core/src/java/org/apache/dns/records/ResourceRecord.java
Url: http://svn.apache.org/viewcvs/incubator/directory/dns/trunk/core/src/java/org/apache/dns/records/ResourceRecord.java?view=diff&rev=125017&p1=incubator/directory/dns/trunk/core/src/java/org/apache/dns/records/ResourceRecord.java&r1=125016&p2=incubator/directory/dns/trunk/core/src/java/org/apache/dns/records/ResourceRecord.java&r2=125017
==============================================================================
--- incubator/directory/dns/trunk/core/src/java/org/apache/dns/records/ResourceRecord.java	(original)
+++ incubator/directory/dns/trunk/core/src/java/org/apache/dns/records/ResourceRecord.java	Wed Jan 12 18:05:30 2005
@@ -64,6 +64,46 @@
 		this.resourceData = resourceData;
 	}
 	
+	/**
+	 * @return Returns the domain name.
+	 */
+	public String getDomainName()
+	{
+		return domainName;
+	}
+	
+	/**
+	 * @return Returns the record type.
+	 */
+	public RecordType getRecordType()
+	{
+		return recordType;
+	}
+	
+	/**
+	 * @return Returns the record class.
+	 */
+	public RecordClass getRecordClass()
+	{
+		return recordClass;
+	}
+	
+	/**
+	 * @return Returns the resource data length.
+	 */
+	public int getResourceDataLength()
+	{
+		return resourceData.length;
+	}
+	
+	/**
+	 * @return Returns the time-to-live (TTL).
+	 */
+	public int getTimeToLive()
+	{
+		return timeToLive;
+	}
+	
 	abstract protected void dataToByteBuffer( ByteBuffer out );
 	
 	public void writeTo( ByteBuffer out )
@@ -73,7 +113,7 @@
 	
 	public String toString()
 	{
-		return "org.apache.dns.records.ResourceRecord[ " + domainName + " ( " +
+		return getClass().getName() + "[ " + domainName + " ( " +
 				recordClass + " " + recordType + " " + timeToLive + " " +
 				resourceData.length + " ) ]";
 	}