/** * Handle a JSON control request. * * The control action is executed directly * using the calling thread. * * @param request the request * @return JSON response, JSON null if the request was not recognized. * @throws Exception on failure */ public JsonElement controlRequest(JsonObject request) throws Exception { if (request.has(OP_KEY)) return controlOperation(request); return JsonNull.INSTANCE; }
/** * Handle a JSON control request. * * The control action is executed directly * using the calling thread. * * @param request the request * @return JSON response, JSON null if the request was not recognized. * @throws Exception on failure */ public JsonElement controlRequest(JsonObject request) throws Exception { if (request.has(OP_KEY)) return controlOperation(request); return JsonNull.INSTANCE; }