throws InvalidMessageException {
try {
Class impl = (Class) registeredMessages.get(new Integer(msgdata[0]));
if (impl == null) {
throw new InvalidMessageException("The message with id " +
String.valueOf(msgdata[0]) + " is not implemented");
}
SubsystemMessage msg = (SubsystemMessage) impl.newInstance();
msg.fromByteArray(msgdata);
addMessage(msg);
return;
} catch (IllegalAccessException iae) {
} catch (InstantiationException ie) {
}
throw new InvalidMessageException("Could not instantiate message class");
}