code: private Class<?> lookupBodyClass(Header header) throws IOException {
      if( header == null ) throw new IOException("Could not deserialize message body: no header.");
      if( header.getCommand() == null ) throw new IOException("Could not deserialize message body: no command declared.");
      Class<?> commandBodyClass = commandToBodyMapping.get(header.getCommand());
      if( commandBodyClass == null ) throw new IOException("Could not deserialize message body: no body class defined for "+header.getCommand()+".");
      return commandBodyClass;
    }
docs: Looks up the body type for a message based on the command in the specified header object.
  
  @param header the header object for the message.
  @return the type of the body message.
  @throws IOException if there is a problem looking up the class.