Class NettyPacketDecoder
java.lang.Object
io.netty5.channel.ChannelHandlerAdapter
io.netty5.handler.codec.ByteToMessageDecoder
eu.cloudnetservice.driver.impl.network.netty.codec.NettyPacketDecoder
- All Implemented Interfaces:
io.netty5.channel.ChannelHandler
public final class NettyPacketDecoder
extends io.netty5.handler.codec.ByteToMessageDecoder
An internal implementation of the packet decoder used for client to server communication. This decoder reverses the
encoding steps done in
NettyPacketEncoder while ensuring that the channel is open and data was transferred to
the component before starting the decoding process.
A packet always contains the following data:
- The numeric id of the channel being sent to, by default a var int.
- An optional query unique id if the packet is a query.
- The data transferred to this component, might be empty.
- Since:
- 4.0
-
Nested Class Summary
Nested classes/interfaces inherited from class io.netty5.handler.codec.ByteToMessageDecoder
io.netty5.handler.codec.ByteToMessageDecoder.Cumulator -
Field Summary
FieldsFields inherited from class io.netty5.handler.codec.ByteToMessageDecoder
COMPOSITE_CUMULATOR, MERGE_CUMULATOR -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.netty5.handler.codec.ByteToMessageDecoder
actualReadableBytes, channelInactive, channelRead, channelReadComplete, channelShutdown, decodeLast, discardSomeReadBytes, handlerAdded, handlerAdded0, handlerRemoved, handlerRemoved0, internalBuffer, isSharable, isSingleDecode, setSingleDecodeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
NettyPacketDecoder
public NettyPacketDecoder()
-
-
Method Details
-
decode
-