return ConsoleRequestConstants.REQUEST_TYPE_CONSOLE_COMMAND;
}
@Override
public void writeResponse(ManagementCenterService mcs, JsonObject root) throws Exception {
ConsoleCommandHandler handler = mcs.getCommandHandler();
JsonObject result = new JsonObject();
try {
final String output = handler.handleCommand(command);
result.add("output", output);
} catch (Throwable e) {
result.add("output", "Error: " + e.getClass().getSimpleName() + "[" + e.getMessage() + "]");
}
root.add("result", result);