public static AbstractEvent parse(ObjectNode node) {
		final String method = node.get("method").getTextValue();
		final ObjectNode params = (ObjectNode)node.get("params");
		if (method.equals(PlayerEvent.Play.METHOD)) {
			return new PlayerEvent.Play(params);
		} else if (method.equals(PlayerEvent.Pause.METHOD)) {
			return new PlayerEvent.Pause(params);
		} else if (method.equals(PlayerEvent.Stop.METHOD)) {
			return new PlayerEvent.Stop(params);
		} else if (method.equals(PlayerEvent.SpeedChanged.METHOD)) {
			return new PlayerEvent.SpeedChanged(params);
		} else if (method.equals(PlayerEvent.Seek.METHOD)) {
			return new PlayerEvent.Seek(params);
		} else if (method.equals(SystemEvent.Quit.METHOD)) {
			return new SystemEvent.Quit(params);
		} else if (method.equals(SystemEvent.Restart.METHOD)) {
			return new SystemEvent.Restart(params);
		} else if (method.equals(SystemEvent.Wake.METHOD)) {
			return new SystemEvent.Wake(params);
		} else if (method.equals(SystemEvent.LowBattery.METHOD)) {
			return new SystemEvent.LowBattery(params);
		} else{
			return null;
		}
	}