Class DatagramDnsQueryDecoder
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.handler.codec.MessageToMessageDecoder<DatagramPacket>
io.netty.handler.codec.dns.DatagramDnsQueryDecoder
- All Implemented Interfaces:
ChannelHandler, ChannelInboundHandler
Decodes a
DatagramPacket into a DatagramDnsQuery.-
Nested Class Summary
Nested classes/interfaces inherited from interface ChannelHandler
ChannelHandler.Sharable -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new decoder with the default record decoder.DatagramDnsQueryDecoder(DnsRecordDecoder recordDecoder) Creates a new decoder with the specifiedrecordDecoder. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddecode(ChannelHandlerContext ctx, DatagramPacket packet, List<Object> out) Decode from one message to an other.Methods inherited from class MessageToMessageDecoder
acceptInboundMessage, channelRead, channelReadCompleteMethods inherited from class ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredMethods inherited from class ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharableMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ChannelHandler
handlerAdded, handlerRemoved
-
Constructor Details
-
DatagramDnsQueryDecoder
public DatagramDnsQueryDecoder()Creates a new decoder with the default record decoder. -
DatagramDnsQueryDecoder
Creates a new decoder with the specifiedrecordDecoder.
-
-
Method Details
-
decode
protected void decode(ChannelHandlerContext ctx, DatagramPacket packet, List<Object> out) throws Exception Description copied from class:MessageToMessageDecoderDecode from one message to an other. This method will be called for each written message that can be handled by this decoder.- Specified by:
decodein classMessageToMessageDecoder<DatagramPacket>- Parameters:
ctx- theChannelHandlerContextwhich thisMessageToMessageDecoderbelongs topacket- the message to decode to an other oneout- theListto which decoded messages should be added- Throws:
Exception- is thrown if an error occurs
-