@UnstableApi public final class TcpDnsQueryDecoder extends LengthFieldBasedFrameDecoder
ByteToMessageDecoder.Cumulator
ChannelHandler.Sharable
COMPOSITE_CUMULATOR, MERGE_CUMULATOR
构造器和说明 |
---|
TcpDnsQueryDecoder()
Creates a new decoder with the default record decoder.
|
TcpDnsQueryDecoder(DnsRecordDecoder decoder,
int maxFrameLength)
Creates a new decoder with the specified
decoder . |
限定符和类型 | 方法和说明 |
---|---|
protected java.lang.Object |
decode(ChannelHandlerContext ctx,
ByteBuf in)
Create a frame out of the
ByteBuf and return it. |
decode, extractFrame, getUnadjustedFrameLength
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggered
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
ensureNotSharable, handlerAdded, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handlerAdded
public TcpDnsQueryDecoder()
public TcpDnsQueryDecoder(DnsRecordDecoder decoder, int maxFrameLength)
decoder
.protected java.lang.Object decode(ChannelHandlerContext ctx, ByteBuf in) throws java.lang.Exception
LengthFieldBasedFrameDecoder
ByteBuf
and return it.decode
在类中 LengthFieldBasedFrameDecoder
ctx
- the ChannelHandlerContext
which this ByteToMessageDecoder
belongs toin
- the ByteBuf
from which to read dataByteBuf
which represent the frame or null
if no frame could
be created.java.lang.Exception