Top Fields Constructors Methods
io.netty.handler.codec.dns

public final Class TcpDnsResponseEncoder

extends MessageToMessageEncoder<DnsResponse>
Class Inheritance
Annotations
@UnstableApi
@Sharable
Imports
io.netty.buffer.ByteBuf, io.netty.channel.ChannelHandler, .ChannelHandlerContext, io.netty.handler.codec.MessageToMessageEncoder, io.netty.util.internal.ObjectUtil, .UnstableApi, java.util.List

Field Summary

Modifier and TypeField and Description
private final DnsRecordEncoder

Constructor Summary

AccessConstructor and Description
public
public
TcpDnsResponseEncoder(DnsRecordEncoder encoder)

Creates a new encoder with the specified encoder.

Method Summary

Modifier and TypeMethod and Description
protected void
encode(ChannelHandlerContext ctx, DnsResponse
the message to encode to an other one
response
,
List<Object>
the List into which the encoded msg should be added needs to do some kind of aggregation
out
)

Implements abstract io.netty.handler.codec.MessageToMessageEncoder.encode.

Encode from one message to an other.
Inherited from io.netty.handler.codec.MessageToMessageEncoder:
acceptOutboundMessagewrite

Field Detail

encoderback to summary
private final DnsRecordEncoder encoder

Constructor Detail

TcpDnsResponseEncoderback to summary
public TcpDnsResponseEncoder()

Creates a new encoder with the default record encoder.

TcpDnsResponseEncoderback to summary
public TcpDnsResponseEncoder(DnsRecordEncoder encoder)

Creates a new encoder with the specified encoder.

Method Detail

encodeback to summary
protected void encode(ChannelHandlerContext ctx, DnsResponse response, List<Object> out) throws Exception

Implements abstract io.netty.handler.codec.MessageToMessageEncoder.encode.

Doc from io.netty.handler.codec.MessageToMessageEncoder.encode.

Encode from one message to an other. This method will be called for each written message that can be handled by this encoder.

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext which this MessageToMessageEncoder belongs to

response:DnsResponse

the message to encode to an other one

out:List<Object>

the List into which the encoded msg should be added needs to do some kind of aggregation

Annotations
@Override
Exceptions
Exception:
is thrown if an error occurs