case READ_HEADER: // the body has yet to be decoded
LOGGER.debug("Decode body");
// now parse the body of a packet (if there are enough bytes to do so)
// Find the correct PacketDeserializer for this packet (using the unique header)
header = ctx.attr(HEADER).get();
PacketDeserializer packetDeserializer = packetDeserializers.get(header);
// If the PacketDeserializer corresponding to the header cannot be found, processing cannot continue
if (packetDeserializer == null) {
String msg = "No suitable PacketDeserializer found for header: " + header;
LOGGER.error(msg);
throw new IllegalStateException(msg);
}
// Use the PacketUnmarshaller to create a new packet instance
Packet packet = packetDeserializer.deserialize(in);
if(LOGGER.isInfoEnabled() && !this.logBlackList.contains(packet.getClass())) {
LOGGER.debug("Decoded body: {}", packet);
}