Class AbstractDnsRecord

java.lang.Object
io.netty.handler.codec.dns.AbstractDnsRecord
All Implemented Interfaces:
DnsRecord
Direct Known Subclasses:
AbstractDnsOptPseudoRrRecord, DefaultDnsPtrRecord, DefaultDnsQuestion, DefaultDnsRawRecord

public abstract class AbstractDnsRecord extends java.lang.Object implements DnsRecord
A skeletal implementation of DnsRecord.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final short
     
    private int
     
    private final java.lang.String
     
    private final long
     
    private final DnsRecordType
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractDnsRecord(java.lang.String name, DnsRecordType type, int dnsClass, long timeToLive)
    Creates a new record.
    protected
    AbstractDnsRecord(java.lang.String name, DnsRecordType type, long timeToLive)
    Creates a new IN-class record.
  • Method Summary

    Modifier and Type
    Method
    Description
    private static java.lang.String
    appendTrailingDot(java.lang.String name)
     
    int
    Returns the class of this resource record.
    boolean
    equals(java.lang.Object obj)
     
    int
     
    private static java.lang.String
    IDNtoASCII(java.lang.String name)
     
    java.lang.String
    Returns the name of this resource record.
    long
    Returns the time to live after reading for this resource record.
    java.lang.String
     
    Returns the type of this resource record.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • name

      private final java.lang.String name
    • type

      private final DnsRecordType type
    • dnsClass

      private final short dnsClass
    • timeToLive

      private final long timeToLive
    • hashCode

      private int hashCode
  • Constructor Details

  • Method Details

    • IDNtoASCII

      private static java.lang.String IDNtoASCII(java.lang.String name)
    • appendTrailingDot

      private static java.lang.String appendTrailingDot(java.lang.String name)
    • name

      public java.lang.String name()
      Description copied from interface: DnsRecord
      Returns the name of this resource record.
      Specified by:
      name in interface DnsRecord
    • type

      public DnsRecordType type()
      Description copied from interface: DnsRecord
      Returns the type of this resource record.
      Specified by:
      type in interface DnsRecord
    • dnsClass

      public int dnsClass()
      Description copied from interface: DnsRecord
      Returns the class of this resource record.
      Specified by:
      dnsClass in interface DnsRecord
      Returns:
      the class value, usually one of the following:
    • timeToLive

      public long timeToLive()
      Description copied from interface: DnsRecord
      Returns the time to live after reading for this resource record.
      Specified by:
      timeToLive in interface DnsRecord
    • equals

      public boolean equals(java.lang.Object obj)
      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