public TypedObject getResult(int id)
	{
		while (connected && !results.containsKey(id))
		{
			sleep(10);
		}

		if (!connected)
			return null;

		TypedObject ret = results.remove(id);
		return ret;
	}