Package io.netty.handler.codec.dns
Class DatagramDnsResponseDecoder
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.handler.codec.MessageToMessageDecoder<io.netty.channel.socket.DatagramPacket>
-
- io.netty.handler.codec.dns.DatagramDnsResponseDecoder
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
@Sharable public class DatagramDnsResponseDecoder extends io.netty.handler.codec.MessageToMessageDecoder<io.netty.channel.socket.DatagramPacket>Decodes aDatagramPacketinto aDatagramDnsResponse.
-
-
Constructor Summary
Constructors Constructor Description DatagramDnsResponseDecoder()Creates a new decoder with the default record decoder.DatagramDnsResponseDecoder(DnsRecordDecoder recordDecoder)Creates a new decoder with the specifiedrecordDecoder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddecode(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.socket.DatagramPacket packet, List<Object> out)protected DnsResponsedecodeResponse(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.socket.DatagramPacket packet)-
Methods inherited from class io.netty.handler.codec.MessageToMessageDecoder
acceptInboundMessage, channelRead, channelReadComplete
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Constructor Detail
-
DatagramDnsResponseDecoder
public DatagramDnsResponseDecoder()
Creates a new decoder with the default record decoder.
-
DatagramDnsResponseDecoder
public DatagramDnsResponseDecoder(DnsRecordDecoder recordDecoder)
Creates a new decoder with the specifiedrecordDecoder.
-
-
Method Detail
-
decode
protected void decode(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.socket.DatagramPacket packet, List<Object> out) throws Exception- Specified by:
decodein classio.netty.handler.codec.MessageToMessageDecoder<io.netty.channel.socket.DatagramPacket>- Throws:
Exception
-
decodeResponse
protected DnsResponse decodeResponse(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.socket.DatagramPacket packet) throws Exception
- Throws:
Exception
-
-