- java.lang.Object
-
- io.netty5.channel.ChannelHandlerAdapter
-
- io.netty5.handler.codec.ByteToMessageDecoder
-
- io.netty5.handler.codec.LengthFieldBasedFrameDecoder
-
- io.netty5.handler.codec.dns.TcpDnsResponseDecoder
-
- All Implemented Interfaces:
ChannelHandler
@UnstableApi public final class TcpDnsResponseDecoder extends LengthFieldBasedFrameDecoder
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.netty5.handler.codec.ByteToMessageDecoder
ByteToMessageDecoder.Cumulator
-
-
Field Summary
-
Fields inherited from class io.netty5.handler.codec.ByteToMessageDecoder
COMPOSITE_CUMULATOR, MERGE_CUMULATOR
-
-
Constructor Summary
Constructors Constructor Description TcpDnsResponseDecoder()
Creates a new decoder with the default record decoder.TcpDnsResponseDecoder(DnsRecordDecoder recordDecoder, int maxFrameLength)
Creates a new decoder with the specifiedrecordDecoder
andmaxFrameLength
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
decode0(ChannelHandlerContext ctx, Buffer in)
Create a frame out of theBuffer
and return it.-
Methods inherited from class io.netty5.handler.codec.LengthFieldBasedFrameDecoder
decode, extractFrame, getUnadjustedFrameLength
-
Methods inherited from class io.netty5.handler.codec.ByteToMessageDecoder
actualReadableBytes, channelInactive, channelRead, channelReadComplete, channelShutdown, decodeLast, discardSomeReadBytes, handlerAdded, handlerAdded0, handlerRemoved, handlerRemoved0, internalBuffer, isSharable, isSingleDecode, setSingleDecode
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty5.channel.ChannelHandler
bind, channelActive, channelExceptionCaught, channelInboundEvent, channelRegistered, channelUnregistered, channelWritabilityChanged, close, connect, deregister, disconnect, flush, pendingOutboundBytes, read, register, sendOutboundEvent, shutdown, write
-
-
-
-
Constructor Detail
-
TcpDnsResponseDecoder
public TcpDnsResponseDecoder()
Creates a new decoder with the default record decoder.
-
TcpDnsResponseDecoder
public TcpDnsResponseDecoder(DnsRecordDecoder recordDecoder, int maxFrameLength)
Creates a new decoder with the specifiedrecordDecoder
andmaxFrameLength
-
-
Method Detail
-
decode0
protected Object decode0(ChannelHandlerContext ctx, Buffer in) throws Exception
Description copied from class:LengthFieldBasedFrameDecoder
Create a frame out of theBuffer
and return it.- Overrides:
decode0
in classLengthFieldBasedFrameDecoder
- Parameters:
ctx
- theChannelHandlerContext
which thisByteToMessageDecoder
belongs toin
- theBuffer
from which to read data- Returns:
- the
Buffer
which represent the frame ornull
if no frame could be created. - Throws:
Exception
-
-