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 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 /
/ /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- Author:
- Apache Directory Project
ResourceRecordImpl
public ResourceRecordImpl(String domainName,
RecordType recordType,
RecordClass recordClass,
int timeToLive,
Map<String,Object> attributes)
- Creates a new instance of ResourceRecordImpl.
- Parameters:
domainName - recordType - recordClass - timeToLive - attributes -
getDomainName
public 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 String get(String id)
- Specified by:
get in interface ResourceRecord
- Returns:
- Returns the value for the id.
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Compute the instance hash code
- Overrides:
hashCode in class Object
- Returns:
- the instance's hash code
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.