org.apache.directory.server.dns.messages
Class ResourceRecordImpl

java.lang.Object
  extended by org.apache.directory.server.dns.messages.ResourceRecordImpl
All Implemented Interfaces:
ResourceRecord

public class ResourceRecordImpl
extends java.lang.Object
implements ResourceRecord

The answer, authority, and additional sections all share the same format: a variable number of resource records, where the number of records is specified in the corresponding count field in the header. Each resource record has the following format: 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | | / / / NAME / | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | TYPE | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | CLASS | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | TTL | | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | RDLENGTH | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| / RDATA / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+


Constructor Summary
ResourceRecordImpl(java.lang.String domainName, RecordType recordType, RecordClass recordClass, int timeToLive, java.util.Map attributes)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String get(java.lang.String id)
           
 java.lang.String getDomainName()
           
 RecordClass getRecordClass()
           
 RecordType getRecordType()
           
 int getTimeToLive()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceRecordImpl

public ResourceRecordImpl(java.lang.String domainName,
                          RecordType recordType,
                          RecordClass recordClass,
                          int timeToLive,
                          java.util.Map attributes)
Method Detail

getDomainName

public java.lang.String getDomainName()
Specified by:
getDomainName in interface ResourceRecord
Returns:
Returns the domainName.

getRecordType

public RecordType getRecordType()
Specified by:
getRecordType in interface ResourceRecord
Returns:
Returns the recordType.

getRecordClass

public RecordClass getRecordClass()
Specified by:
getRecordClass in interface ResourceRecord
Returns:
Returns the recordClass.

getTimeToLive

public int getTimeToLive()
Specified by:
getTimeToLive in interface ResourceRecord
Returns:
Returns the timeToLive.

get

public java.lang.String get(java.lang.String id)
Specified by:
get in interface ResourceRecord
Returns:
Returns the value for the id.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object