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

public Class DatagramDnsQueryDecoder

extends MessageToMessageDecoder<DatagramPacket>
Class Inheritance
Annotations
@UnstableApi
@Sharable
Imports
io.netty.channel.ChannelHandler, .ChannelHandlerContext, io.netty.channel.socket.DatagramPacket, io.netty.handler.codec.MessageToMessageDecoder, io.netty.util.internal.UnstableApi, java.util.List

Decodes a DatagramPacket into a DatagramDnsQuery.

Field Summary

Modifier and TypeField and Description
private final DnsRecordDecoder

Constructor Summary

AccessConstructor and Description
public
public
DatagramDnsQueryDecoder(DnsRecordDecoder recordDecoder)

Creates a new decoder with the specified recordDecoder.

Method Summary

Modifier and TypeMethod and Description
protected void
decode(ChannelHandlerContext ctx, final DatagramPacket
the message to decode to an other one
packet
,
List<Object>
the List to which decoded messages should be added
out
)

Implements abstract io.netty.handler.codec.MessageToMessageDecoder.decode.

Decode from one message to an other.
Inherited from io.netty.handler.codec.MessageToMessageDecoder:
acceptInboundMessagechannelRead

Field Detail

recordDecoderback to summary
private final DnsRecordDecoder recordDecoder

Constructor Detail

DatagramDnsQueryDecoderback to summary
public DatagramDnsQueryDecoder()

Creates a new decoder with the default record decoder.

DatagramDnsQueryDecoderback to summary
public DatagramDnsQueryDecoder(DnsRecordDecoder recordDecoder)

Creates a new decoder with the specified recordDecoder.

Method Detail

decodeback to summary
protected void decode(ChannelHandlerContext ctx, final DatagramPacket packet, List<Object> out) throws Exception

Implements abstract io.netty.handler.codec.MessageToMessageDecoder.decode.

Doc from io.netty.handler.codec.MessageToMessageDecoder.decode.

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

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext which this MessageToMessageDecoder belongs to

packet:DatagramPacket

the message to decode to an other one

out:List<Object>

the List to which decoded messages should be added

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