- 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 DnsPtrRecord
copy()
Returns a copy of this record object.String
hostname()
Returns the hostname this PTR record resolves to.String
toString()
-
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:DnsPtrRecord
Returns the hostname this PTR record resolves to.- Specified by:
hostname
in interfaceDnsPtrRecord
-
toString
public String toString()
- Overrides:
toString
in classAbstractDnsRecord
-
copy
public DnsPtrRecord copy()
Description copied from interface:DnsRecord
Returns a copy of this record object. Immutable record objects may return themselves.- Specified by:
copy
in interfaceDnsPtrRecord
- Specified by:
copy
in interfaceDnsRecord
-
-