Class AbstractDnsRecord
java.lang.Object
io.netty.handler.codec.dns.AbstractDnsRecord
- All Implemented Interfaces:
DnsRecord
- Direct Known Subclasses:
AbstractDnsOptPseudoRrRecord, DefaultDnsPtrRecord, DefaultDnsQuestion, DefaultDnsRawRecord
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final shortprivate intprivate final java.lang.Stringprivate final longprivate final DnsRecordTypeFields inherited from interface DnsRecord
CLASS_ANY, CLASS_CHAOS, CLASS_CSNET, CLASS_HESIOD, CLASS_IN, CLASS_NONE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractDnsRecord(java.lang.String name, DnsRecordType type, int dnsClass, long timeToLive) Creates a new record.protectedAbstractDnsRecord(java.lang.String name, DnsRecordType type, long timeToLive) Creates a newIN-classrecord. -
Method Summary
Modifier and TypeMethodDescriptionprivate static java.lang.StringappendTrailingDot(java.lang.String name) intdnsClass()Returns the class of this resource record.booleanequals(java.lang.Object obj) inthashCode()private static java.lang.StringIDNtoASCII(java.lang.String name) java.lang.Stringname()Returns the name of this resource record.longReturns the time to live after reading for this resource record.java.lang.StringtoString()type()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
-
dnsClass
private final short dnsClass -
timeToLive
private final long timeToLive -
hashCode
private int hashCode
-
-
Constructor Details
-
AbstractDnsRecord
Creates a newIN-classrecord.- Parameters:
name- the domain nametype- the type of the recordtimeToLive- the TTL value of the record
-
AbstractDnsRecord
protected AbstractDnsRecord(java.lang.String name, DnsRecordType type, int dnsClass, long timeToLive) Creates a new record.- Parameters:
name- the domain nametype- the type of the recorddnsClass- the class of the record, usually one of the following:timeToLive- the TTL value of the record
-
-
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
-
type
Description copied from interface:DnsRecordReturns the type of this resource record. -
dnsClass
-
timeToLive
public long timeToLive()Description copied from interface:DnsRecordReturns the time to live after reading for this resource record.- Specified by:
timeToLivein interfaceDnsRecord
-
equals
public boolean equals(java.lang.Object obj) - Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-