@UnstableApi @ChannelHandler.Sharable public class DatagramDnsResponseDecoder extends MessageToMessageDecoder<DatagramPacket>
ChannelHandler.Sharable
Constructor and Description |
---|
DatagramDnsResponseDecoder()
用
the default record decoder创建一个新的解码器。
|
DatagramDnsResponseDecoder(DnsRecordDecoder recordDecoder)
用指定的
recordDecoder 创建一个新的解码器。
|
Modifier and Type | Method and Description |
---|---|
protected void |
decode(ChannelHandlerContext ctx, DatagramPacket packet, java.util.List<java.lang.Object> out)
从一条消息解码到另一条消息。
|
acceptInboundMessage, channelRead
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handlerAdded, handlerRemoved
public DatagramDnsResponseDecoder()
public DatagramDnsResponseDecoder(DnsRecordDecoder recordDecoder)
recordDecoder
创建一个新的解码器。
protected void decode(ChannelHandlerContext ctx, DatagramPacket packet, java.util.List<java.lang.Object> out) throws java.lang.Exception
MessageToMessageDecoder
decode
在课程
MessageToMessageDecoder<DatagramPacket>
ctx
- 这个MessageToMessageDecoder
所属的ChannelHandlerContext
packet
- 解码到另一个的消息
out
- 应该添加解码消息的
List
java.lang.Exception
- 发生错误时抛出
Copyright © 2008–2018 The Netty Project. All rights reserved.