use of com.hazelcast.internal.management.ConsoleCommandHandler in project hazelcast by hazelcast.
the class ConsoleCommandRequest method writeResponse.
@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);
}
Aggregations