- java.lang.Object
-
- io.netty5.handler.codec.dns.AbstractDnsRecord
-
- All Implemented Interfaces:
DnsRecord
- Direct Known Subclasses:
AbstractDnsOptPseudoRrRecord,DefaultDnsPtrRecord,DefaultDnsQuestion,DefaultDnsRawRecord
@UnstableApi public abstract class AbstractDnsRecord extends Object implements DnsRecord
A skeletal implementation ofDnsRecord.
-
-
Field Summary
-
Fields inherited from interface io.netty5.handler.codec.dns.DnsRecord
CLASS_ANY, CLASS_CHAOS, CLASS_CSNET, CLASS_HESIOD, CLASS_IN, CLASS_NONE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDnsRecord(String name, DnsRecordType type, int dnsClass, long timeToLive)Creates a new record.protectedAbstractDnsRecord(String name, DnsRecordType type, long timeToLive)Creates a newIN-classrecord.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdnsClass()Returns the class of this resource record.booleanequals(Object obj)inthashCode()Stringname()Returns the name of this resource record.longtimeToLive()Returns the time to live after reading for this resource record.StringtoString()DnsRecordTypetype()Returns the type of this resource record.
-
-
-
Constructor Detail
-
AbstractDnsRecord
protected AbstractDnsRecord(String name, DnsRecordType type, long timeToLive)
Creates a newIN-classrecord.- Parameters:
name- the domain nametype- the type of the recordtimeToLive- the TTL value of the record
-
AbstractDnsRecord
protected AbstractDnsRecord(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 Detail
-
name
public String name()
Description copied from interface:DnsRecordReturns the name of this resource record.
-
type
public DnsRecordType type()
Description copied from interface:DnsRecordReturns the type of this resource record.
-
dnsClass
public int dnsClass()
Description copied from interface:DnsRecordReturns the class of this resource record.
-
timeToLive
public long timeToLive()
Description copied from interface:DnsRecordReturns the time to live after reading for this resource record.- Specified by:
timeToLivein interfaceDnsRecord
-
-