public Message getMessageClass(String msg) {
		String msgType = msg.substring(2, 4);

		String classStr = MSG_CLASSES.get(msgType);
		Message message = null;
		try {
			Class<Message> claz = (Class<Message>) Class.forName(classStr);
			Constructor constructor = claz.getConstructor(String.class,
					String.class);

			message = (Message) constructor.newInstance(null, msg);
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (InstantiationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NoSuchMethodException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SecurityException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IllegalArgumentException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (InvocationTargetException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		return message;
	}