org.apache.directory.server.dns.messages
Class ResourceRecordImpl
java.lang.Object
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 /
/ /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
ResourceRecordImpl
public ResourceRecordImpl(java.lang.String domainName,
RecordType recordType,
RecordClass recordClass,
int timeToLive,
java.util.Map attributes)
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
Copyright © 2003-2010 Apache Software Foundation. All Rights Reserved.