- java.lang.Object
-
- io.netty5.handler.codec.dns.AbstractDnsRecord
-
- io.netty5.handler.codec.dns.DefaultDnsPtrRecord
-
- All Implemented Interfaces:
DnsPtrRecord,DnsRecord
@UnstableApi public class DefaultDnsPtrRecord extends AbstractDnsRecord implements DnsPtrRecord
-
-
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 Constructor Description DefaultDnsPtrRecord(String name, int dnsClass, long timeToLive, String hostname)Creates a new PTR record.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DnsPtrRecordcopy()Returns a copy of this record object.Stringhostname()Returns the hostname this PTR record resolves to.StringtoString()-
Methods inherited from class io.netty5.handler.codec.dns.AbstractDnsRecord
dnsClass, equals, hashCode, name, timeToLive, type
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.netty5.handler.codec.dns.DnsRecord
dnsClass, name, timeToLive, type
-
-
-
-
Constructor Detail
-
DefaultDnsPtrRecord
public DefaultDnsPtrRecord(String name, int dnsClass, long timeToLive, String hostname)
Creates a new PTR record.- Parameters:
name- the domain namednsClass- the class of the record, usually one of the following:timeToLive- the TTL value of the recordhostname- the hostname this PTR record resolves to.
-
-
Method Detail
-
hostname
public String hostname()
Description copied from interface:DnsPtrRecordReturns the hostname this PTR record resolves to.- Specified by:
hostnamein interfaceDnsPtrRecord
-
toString
public String toString()
- Overrides:
toStringin classAbstractDnsRecord
-
copy
public DnsPtrRecord copy()
Description copied from interface:DnsRecordReturns a copy of this record object. Immutable record objects may return themselves.- Specified by:
copyin interfaceDnsPtrRecord- Specified by:
copyin interfaceDnsRecord
-
-