DNS
Class ResourceRecord

java.lang.Object
  extended byDNS.ResourceRecord
All Implemented Interfaces:
java.io.Serializable

public class ResourceRecord
extends java.lang.Object
implements java.io.Serializable

Data structure to represent a Resource Record. Has many fields, but only certain fields are used for certain types.

See Also:
Serialized Form

Field Summary
 long expires
          When this record expires (-1 for never)
 SerializableDSAPublicKey key
          The public key of this zone
 java.lang.String name
          The name field of A, NX, NS, KEY, SIG, NXT and SOA records
 java.lang.String nameCovered
          The name of the Record that this SIG record corresponds to
 java.lang.String next
          The name of the next RRGroup covered
 DSASignature signature
          The actual signature
 java.lang.String signer
          The name of the entity that signed this zone
 java.lang.String type
          The type of this RR (one of SOA, A, NS, NXT, KEY, SIG, (NX))
 java.lang.String typeCovered
          The type of the Record that this SIG record corresponds to
 SerializableArrayList types
          The types in the RRGroup holding this RR
 java.lang.String value
          The string representation of the ip (or delegate name server)
 
Constructor Summary
ResourceRecord()
           
ResourceRecord(java.lang.String type, java.lang.String name, long duration)
           
 
Method Summary
 ResourceRecord cache()
          Basically clone this item, copy all fields.
 ResourceRecord cache(int duration)
          Basically clone this item, copy all fields, update the expiration time to be duration ms from now.
 boolean equals(java.lang.Object o)
           
 boolean isA()
           
 boolean isExpired()
          Returns if this record is expired.
 boolean isKEY()
           
 boolean isNS()
           
 boolean isNX()
           
 boolean isNXT()
           
 boolean isSIG()
           
 boolean isSOA()
           
 void makeARecord(java.lang.String value)
          Add the value field to an RR.
 void makeKEYRecord(DSAPublicKeyParameters key)
          Add the key record to a KEY record.
 void makeNSRecord(java.lang.String value)
          Add the value field to an RR.
 void makeNXTRecord(java.lang.String next, java.util.ArrayList types)
          Add the next and types field to a NXT record.
 void makeSIGRecord(java.lang.String typeCovered, java.lang.String nameCovered, java.lang.String signer, DSASignature signature)
          Add the typeCovered, nameCovered, signer and signature fields to a SIG record.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

public java.lang.String type
The type of this RR (one of SOA, A, NS, NXT, KEY, SIG, (NX))


expires

public long expires
When this record expires (-1 for never)


name

public java.lang.String name
The name field of A, NX, NS, KEY, SIG, NXT and SOA records


value

public java.lang.String value
The string representation of the ip (or delegate name server)


next

public java.lang.String next
The name of the next RRGroup covered


types

public SerializableArrayList types
The types in the RRGroup holding this RR


key

public SerializableDSAPublicKey key
The public key of this zone


nameCovered

public java.lang.String nameCovered
The name of the Record that this SIG record corresponds to


typeCovered

public java.lang.String typeCovered
The type of the Record that this SIG record corresponds to


signer

public java.lang.String signer
The name of the entity that signed this zone


signature

public DSASignature signature
The actual signature

Constructor Detail

ResourceRecord

public ResourceRecord()

ResourceRecord

public ResourceRecord(java.lang.String type,
                      java.lang.String name,
                      long duration)
Method Detail

cache

public ResourceRecord cache()
Basically clone this item, copy all fields.


equals

public boolean equals(java.lang.Object o)

cache

public ResourceRecord cache(int duration)
Basically clone this item, copy all fields, update the expiration time to be duration ms from now.


isExpired

public boolean isExpired()
Returns if this record is expired.


toString

public java.lang.String toString()

makeARecord

public void makeARecord(java.lang.String value)
Add the value field to an RR.


makeNSRecord

public void makeNSRecord(java.lang.String value)
Add the value field to an RR.


makeNXTRecord

public void makeNXTRecord(java.lang.String next,
                          java.util.ArrayList types)
Add the next and types field to a NXT record.


makeSIGRecord

public void makeSIGRecord(java.lang.String typeCovered,
                          java.lang.String nameCovered,
                          java.lang.String signer,
                          DSASignature signature)
Add the typeCovered, nameCovered, signer and signature fields to a SIG record.


makeKEYRecord

public void makeKEYRecord(DSAPublicKeyParameters key)
Add the key record to a KEY record.


isSOA

public boolean isSOA()

isNXT

public boolean isNXT()

isNS

public boolean isNS()

isNX

public boolean isNX()

isA

public boolean isA()

isSIG

public boolean isSIG()

isKEY

public boolean isKEY()