Message message;
short clientID;
try {
// read the message
ReceivedMessage recv = MessagePacker.unpack(data, getClassLoader());
// all set, just unpack the received message
message = recv.getMessage();
clientID = recv.getClientID();
} catch (PackerException eme) {
logger.log(Level.WARNING, "Error extracting message from server",
eme);
// if possible, send an error reply to the client