KryoNet Class per Packet

So I when I use Netty or NIO I always make a packetmanager class (packets are assigned on startup ex. 1 = new MovePacket()) which would have a handle(opcode) method.
This is what I would like to have with KryoNet, I currently have a lot of methods inside the kryonet server Listener. I’m having a hard time with maintainability

Make sure all your packet classes are under a superclass “Packet”, it could be an interface or an abstract class. The superclass packet has two abstract methods: “actionClient” and “actionServer”. The server listener will do an instanceof check for Packet, and call actionServer on the packet object. The client will do the same thing except call actionClient. Each “sub-packet” (for example MovePacket) will implement actionClient and actionServer individually.

I was working on this a few days ago, if you want to see some source code head over here: Packet, ClientListener, ServerListener

I see, I was trying to replicate such thing.