@SuppressWarnings("unchecked")
	public static <M extends RMonitorMessage> M getMessage(String line)
	{
		System.out.println(line);
		// TODO: better tokenizing here - doesn't handle values with commas
		String[] tokens = line.split(",");

		for (int i = 0; i < tokens.length; i++) {
			tokens[i] = tokens[i].replaceAll("\"", "");
		}
		Class<?> messageClass = classMap.get(tokens[0]);

		try {
			Constructor<?> constructor = messageClass.getDeclaredConstructor(String[].class);
			return (M) constructor.newInstance(new Object[] {
				tokens
			});
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}