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 /
/ /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- Version:
- $Rev: 664295 $, $Date: 2008-06-07 09:48:16 +0200 (Sa, 07 Jun 2008) $
- Author:
- Apache Directory Project
Constructor Summary |
ResourceRecordImpl(java.lang.String domainName,
RecordType recordType,
RecordClass recordClass,
int timeToLive,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates a new instance of ResourceRecordImpl. |
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<java.lang.String,java.lang.Object> attributes)
- Creates a new instance of ResourceRecordImpl.
- Parameters:
domainName
- recordType
- recordClass
- timeToLive
- 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()
- Compute the instance hash code
- Overrides:
hashCode
in class java.lang.Object
- Returns:
- the instance's hash code
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.