Top Description Fields Constructors Methods
io.netty5.handler.codec.dns

public Class DefaultDnsRawRecord

extends AbstractDnsRecord
implements DnsRawRecord
Class Inheritance
All Implemented Interfaces
io.netty5.handler.codec.dns.DnsRawRecord, io.netty5.util.Resource, java.lang.AutoCloseable, io.netty5.handler.codec.dns.DnsRecord
Annotations
@UnstableApi
Imports
io.netty5.buffer.Buffer, io.netty5.util.Send, io.netty5.util.internal.StringUtil, .UnstableApi

The default DnsRawRecord implementation.

Field Summary

Modifier and TypeField and Description
private final Buffer

Constructor Summary

AccessConstructor and Description
public
DefaultDnsRawRecord(String
the domain name
name
,
DnsRecordType
the type of the record
type
,
long
the TTL value of the record
timeToLive
,
Buffer content)

Creates a new IN-class record.

public
DefaultDnsRawRecord(String
the domain name
name
,
DnsRecordType
the type of the record
type
,
int
the class of the record, usually one of the following:
dnsClass
,
long
the TTL value of the record
timeToLive
,
Buffer content)

Creates a new record.

public
DefaultDnsRawRecord(String name, DnsRecordType type, int dnsClass, long timeToLive, Send<Buffer> content)

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements io.netty5.util.Resource.close.

Close the resource, making it inaccessible.
public Buffer
content()

Implements io.netty5.handler.codec.dns.DnsRawRecord.content.

Get a reference to the Buffer backing this raw DNS record.
public DnsRawRecord
public boolean
isAccessible()

Implements io.netty5.util.Resource.isAccessible.

Check if this object is accessible.
public DnsRawRecord
replace(Buffer content)

public Send<DnsRawRecord>
send()

Implements io.netty5.util.Resource.send.

Send this object instance to another Thread, transferring the ownership to the recipient.
public String
toString()

Overrides io.netty5.handler.codec.dns.AbstractDnsRecord.toString.

Returns a string representation of the object.
public DnsRawRecord
touch(Object
An optional hint about this access and its context. May be null.
hint
)

Implements io.netty5.handler.codec.dns.DnsRawRecord.touch.

Record the current access location for debugging purposes.
Inherited from io.netty5.handler.codec.dns.AbstractDnsRecord:
dnsClassequalshashCodenametimeToLivetype

Field Detail

contentback to summary
private final Buffer content

Constructor Detail

DefaultDnsRawRecordback to summary
public DefaultDnsRawRecord(String name, DnsRecordType type, long timeToLive, Buffer content)

Creates a new IN-class record.

Parameters
name:String

the domain name

type:DnsRecordType

the type of the record

timeToLive:long

the TTL value of the record

DefaultDnsRawRecordback to summary
public DefaultDnsRawRecord(String name, DnsRecordType type, int dnsClass, long timeToLive, Buffer content)

Creates a new record.

Parameters
name:String

the domain name

type:DnsRecordType

the type of the record

dnsClass:int

the class of the record, usually one of the following:

timeToLive:long

the TTL value of the record

DefaultDnsRawRecordback to summary
public DefaultDnsRawRecord(String name, DnsRecordType type, int dnsClass, long timeToLive, Send<Buffer> content)

Method Detail

closeback to summary
public void close()

Implements io.netty5.util.Resource.close.

Doc from io.netty5.util.Resource.close.

Close the resource, making it inaccessible.

Note, this method is not thread-safe unless otherwise specified.

Annotations
@Override
contentback to summary
public Buffer content()

Implements io.netty5.handler.codec.dns.DnsRawRecord.content.

Doc from io.netty5.handler.codec.dns.DnsRawRecord.content.

Get a reference to the Buffer backing this raw DNS record. Care must be taken with the returned buffer, as changes to the buffer offsets or its contents will reflect on the raw DNS record contents.

Returns:Buffer

The Buffer instance backing this raw DNS record.

Annotations
@Override
copyback to summary
public DnsRawRecord copy()

Implements io.netty5.handler.codec.dns.DnsRawRecord.copy, io.netty5.handler.codec.dns.DnsRecord.copy.

Doc from io.netty5.handler.codec.dns.DnsRecord.copy.

Returns a copy of this record object. Immutable record objects may return themselves.

Annotations
@Override
isAccessibleback to summary
public boolean isAccessible()

Implements io.netty5.util.Resource.isAccessible.

Doc from io.netty5.util.Resource.isAccessible.

Check if this object is accessible.

Returns:boolean

true if this object is still valid and can be accessed, otherwise false if, for instance, this object has been dropped/deallocated, or been sent elsewhere.

Annotations
@Override
replaceback to summary
public DnsRawRecord replace(Buffer content)
sendback to summary
public Send<DnsRawRecord> send()

Implements io.netty5.util.Resource.send.

Doc from io.netty5.util.Resource.send.

Send this object instance to another Thread, transferring the ownership to the recipient.

The object must be in a state where it can be sent, which includes at least being accessible.

When sent, this instance will immediately become inaccessible, as if by closing it. All attempts at accessing an object that has been sent, even if that object has not yet been received, should cause an exception to be thrown.

Calling close() on an object that has been sent will have no effect, so this method is safe to call within a try-with-resources statement.

Annotations
@Override
toStringback to summary
public String toString()

Overrides io.netty5.handler.codec.dns.AbstractDnsRecord.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override
touchback to summary
public DnsRawRecord touch(Object hint)

Implements io.netty5.handler.codec.dns.DnsRawRecord.touch.

Doc from io.netty5.util.Resource.touch.

Record the current access location for debugging purposes. This information may be included if the resource throws a life-cycle related exception, or if it leaks. If this resource has already been closed, then this method has no effect.

Parameters
hint:Object

An optional hint about this access and its context. May be null.

Returns:DnsRawRecord

This resource instance.

Annotations
@Override