...
The diagram above shows the high level actions that takes place on a server when it receives data from a client. First the Server reads in the data. It creates a packet (determining the type for specialization). Once the packet is fully read in and created, the Server calls the handle method on the packet. The handle method determines what actions need to be applied. The packet can also define interfaces that enable specific actions to happen on the client or server which is known as a callback. A Packet can also define a response field. The response field allows for a packet to be sent back to the origin of the packet.
The Lobby Server's com.monkygames.nautdrafter.network.packets.ClientIdPacket demonstrates all of the possibilities with a Packet including a callback and a response.
...