/** * Fuehrt ein REST-Kommando auf dem angegebenen Server aus. * * @param server Alias-Name des Servers. * @param restCommand das REST-Kommando. * @return das JSON-Response von dem Server. * @throws IOException */ public JSONArray execute(String server, String restCommand) throws IOException { // Server-URL ermitteln String url = SETTINGS.getString("jameica.server." + server, null); if (url == null) return null; try { return (JSONArray) JSONClient.execute(url, restCommand); } catch (Exception e) { Logger.error("unable to execute json command " + restCommand + " on server " + server, e); throw new IOException( "unable to execute json command " + restCommand + " on server " + server); } }