Ah, this is what you mean with uniform
My definition of uniform is that the server handles all data in the same way. What you described I’d call a protocol.
Anyway, I’d make a HashMap<Byte,YourDataProcessorClass> for this, with Byte being the type of the packet.
Then, when receiving a packet, you just retrieve the data processor for it and pass the packet to that.
This way you can easily separate code into multiple independent classes.
The data processor is just a class or interface with a function, each child class or instance has a different implementation for that function then.
This is basically how the server for my own game works right now.