Package com.eclipsesource.json

Examples of com.eclipsesource.json.JsonObject$HashIndexTable


        return builder.toString();
    }


    public JsonObject toJson() {
        JsonObject root = new JsonObject();
        root.add("version", version);
        root.add("clusterName", clusterName);
        root.add("address", address);
        return root;
    }
View Full Code Here


        return Collections.emptyList();
    }

    @Override
    public void writeResponse(ManagementCenterService mcs, JsonObject root) throws Exception {
        final JsonObject result = new JsonObject();
        JsonArray logs = new JsonArray();
        result.add("logs", logs);
        root.add("result", result);
    }
View Full Code Here

        root.add("result", result);
    }

    @Override
    public JsonObject toJson() {
        return new JsonObject();
    }
View Full Code Here

    }

    @Override
    public void writeResponse(ManagementCenterService mcs, JsonObject root) {
        Properties properties = System.getProperties();
        JsonObject result = new JsonObject();
        for (Map.Entry<Object, Object> entry : properties.entrySet()) {
            result.add(entry.getKey().toString(), entry.getValue().toString());
        }
        root.add("result", result);
    }
View Full Code Here

        root.add("result", result);
    }

    @Override
    public JsonObject toJson() {
        return new JsonObject();
    }
View Full Code Here

    }

    @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);
    }
View Full Code Here

        return getString(json, "output", "Error while reading response " + ConsoleCommandRequest.class.getName());
    }

    @Override
    public JsonObject toJson() {
        final JsonObject root = new JsonObject();
        root.add("command", command);
        return root;
    }
View Full Code Here

    }

    @Override
    public void writeResponse(ManagementCenterService mcs, JsonObject root) throws Exception {
        System.gc();
        root.add("result", new JsonObject());
    }
View Full Code Here

        root.add("result", new JsonObject());
    }

    @Override
    public JsonObject toJson() {
        return new JsonObject();
    }
View Full Code Here

    }

    @Override
    public void writeResponse(ManagementCenterService mcs, JsonObject root) throws Exception {
        IMap map = mcs.getHazelcastInstance().getMap(mapName);
        JsonObject result = new JsonObject();
        EntryView entry = null;
        if (type.equals("string")) {
            entry = map.getEntryView(key);
        } else if (type.equals("long")) {
            entry = map.getEntryView(Long.valueOf(key));
        } else if (type.equals("integer")) {
            entry = map.getEntryView(Integer.valueOf(key));
        }
        if (entry != null) {
            Object value = entry.getValue();
            result.add("browse_value", value != null ? value.toString() : "null");
            result.add("browse_class", value != null ? value.getClass().getName() : "null");
            result.add("memory_cost", Long.toString(entry.getCost()));
            result.add("date_creation_time", Long.toString(entry.getCreationTime()));
            result.add("date_expiration_time", Long.toString(entry.getExpirationTime()));
            result.add("browse_hits", Long.toString(entry.getHits()));
            result.add("date_access_time", Long.toString(entry.getLastAccessTime()));
            result.add("date_update_time", Long.toString(entry.getLastUpdateTime()));
            result.add("browse_version", Long.toString(entry.getVersion()));
        }
        root.add("result", result);
    }
View Full Code Here

TOP

Related Classes of com.eclipsesource.json.JsonObject$HashIndexTable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.