use of com.eclipsesource.json.JsonObject in project hazelcast by hazelcast.
the class ManagementCenterIdentifier method toJson.
@Override
public JsonObject toJson() {
JsonObject root = new JsonObject();
root.add("version", version);
root.add("clusterName", clusterName);
root.add("address", address);
return root;
}
use of com.eclipsesource.json.JsonObject in project hazelcast by hazelcast.
the class MemberConfigRequest method writeResponse.
@Override
public void writeResponse(ManagementCenterService mcs, JsonObject root) {
final JsonObject result = new JsonObject();
ConfigXmlGenerator configXmlGenerator = new ConfigXmlGenerator(true);
Config config = mcs.getHazelcastInstance().getConfig();
String configXmlString = configXmlGenerator.generate(config);
result.add("configXmlString", configXmlString);
root.add("result", result);
}
use of com.eclipsesource.json.JsonObject in project hazelcast by hazelcast.
the class RunGcRequest method writeResponse.
@Override
@SuppressFBWarnings(value = "DM_GC", justification = "Explicit GC is the point of this class")
public void writeResponse(ManagementCenterService mcs, JsonObject root) throws Exception {
System.gc();
root.add("result", new JsonObject());
}
use of com.eclipsesource.json.JsonObject in project hazelcast by hazelcast.
the class ShutdownClusterRequest method writeResponse.
@Override
public void writeResponse(ManagementCenterService mcs, JsonObject out) throws Exception {
String resultString = "SUCCESS";
try {
mcs.getHazelcastInstance().getCluster().shutdown();
} catch (Exception e) {
ILogger logger = mcs.getHazelcastInstance().node.nodeEngine.getLogger(getClass());
logger.warning("Cluster can not be shutdown: ", e);
resultString = e.getMessage();
}
JsonObject result = new JsonObject().add("result", resultString);
out.add("result", result);
}
use of com.eclipsesource.json.JsonObject in project hazelcast by hazelcast.
the class ThreadDumpRequest method toJson.
@Override
public JsonObject toJson() {
final JsonObject root = new JsonObject();
root.add("dumpDeadlocks", dumpDeadlocks);
return root;
}
Aggregations