Package io.netty.handler.codec.dns
Class AbstractDnsRecord
java.lang.Object
io.netty.handler.codec.dns.AbstractDnsRecord
- All Implemented Interfaces:
DnsRecord
- Direct Known Subclasses:
AbstractDnsOptPseudoRrRecord
,DefaultDnsPtrRecord
,DefaultDnsQuestion
,DefaultDnsRawRecord
A skeletal implementation of
DnsRecord
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final short
private int
private final String
private final long
private final DnsRecordType
Fields inherited from interface io.netty.handler.codec.dns.DnsRecord
CLASS_ANY, CLASS_CHAOS, CLASS_CSNET, CLASS_HESIOD, CLASS_IN, CLASS_NONE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractDnsRecord
(String name, DnsRecordType type, int dnsClass, long timeToLive) Creates a new record.protected
AbstractDnsRecord
(String name, DnsRecordType type, long timeToLive) Creates a newIN-class
record. -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
appendTrailingDot
(String name) int
dnsClass()
Returns the class of this resource record.boolean
int
hashCode()
private static String
IDNtoASCII
(String name) name()
Returns the name of this resource record.long
Returns the time to live after reading for this resource record.toString()
type()
Returns the type of this resource record.
-
Field Details
-
name
-
type
-
dnsClass
private final short dnsClass -
timeToLive
private final long timeToLive -
hashCode
private int hashCode
-
-
Constructor Details
-
AbstractDnsRecord
Creates a newIN-class
record.- Parameters:
name
- the domain nametype
- the type of the recordtimeToLive
- the TTL value of the record
-
AbstractDnsRecord
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
-
appendTrailingDot
-
name
Description copied from interface:DnsRecord
Returns the name of this resource record. -
type
Description copied from interface:DnsRecord
Returns the type of this resource record. -
dnsClass
public int dnsClass()Description copied from interface:DnsRecord
Returns the class of this resource record. -
timeToLive
public long timeToLive()Description copied from interface:DnsRecord
Returns the time to live after reading for this resource record.- Specified by:
timeToLive
in interfaceDnsRecord
-
equals
-
hashCode
public int hashCode() -
toString
-