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

public final Class TcpDnsResponseDecoder

extends LengthFieldBasedFrameDecoder
Class Inheritance
Annotations
@UnstableApi
Imports
io.netty.buffer.ByteBuf, io.netty.channel.ChannelHandlerContext, io.netty.handler.codec.LengthFieldBasedFrameDecoder, io.netty.util.internal.UnstableApi, java.net.SocketAddress

Field Summary

Modifier and TypeField and Description
private final DnsResponseDecoder<SocketAddress>

Constructor Summary

AccessConstructor and Description
public
public
TcpDnsResponseDecoder(DnsRecordDecoder recordDecoder, int maxFrameLength)

Creates a new decoder with the specified recordDecoder and maxFrameLength

Method Summary

Modifier and TypeMethod and Description
protected Object
decode(ChannelHandlerContext ctx, ByteBuf
the ByteBuf from which to read data
in
)

Overrides io.netty.handler.codec.LengthFieldBasedFrameDecoder.decode.

Create a frame out of the ByteBuf and return it.
protected ByteBuf
extractFrame(ChannelHandlerContext ctx, ByteBuf buffer, int index, int length)

Overrides io.netty.handler.codec.LengthFieldBasedFrameDecoder.extractFrame.

Extract the sub-region of the specified buffer.
Inherited from io.netty.handler.codec.LengthFieldBasedFrameDecoder:
decodegetUnadjustedFrameLength

Field Detail

responseDecoderback to summary
private final DnsResponseDecoder<SocketAddress> responseDecoder

Constructor Detail

TcpDnsResponseDecoderback to summary
public TcpDnsResponseDecoder()

Creates a new decoder with the default record decoder.

TcpDnsResponseDecoderback to summary
public TcpDnsResponseDecoder(DnsRecordDecoder recordDecoder, int maxFrameLength)

Creates a new decoder with the specified recordDecoder and maxFrameLength

Method Detail

decodeback to summary
protected Object decode(ChannelHandlerContext ctx, ByteBuf in) throws Exception

Overrides io.netty.handler.codec.LengthFieldBasedFrameDecoder.decode.

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

Create a frame out of the ByteBuf and return it.

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext which this ByteToMessageDecoder belongs to

in:ByteBuf

the ByteBuf from which to read data

Returns:Object

frame the ByteBuf which represent the frame or null if no frame could be created.

Annotations
@Override
extractFrameback to summary
protected ByteBuf extractFrame(ChannelHandlerContext ctx, ByteBuf buffer, int index, int length)

Overrides io.netty.handler.codec.LengthFieldBasedFrameDecoder.extractFrame.

Doc from io.netty.handler.codec.LengthFieldBasedFrameDecoder.extractFrame.

Extract the sub-region of the specified buffer.

Annotations
@Override