Package autotest.common

Examples of autotest.common.JsonRpcCallback


        assert event.getSource() == embeddingLink;
        JSONObject params = new JSONObject();
        params.put("url_token", new JSONString(CustomHistory.getLastHistoryToken().toString()));
        addAdditionalEmbeddingParams(params);

        rpcProxy.rpcCall("get_embedding_id", params, new JsonRpcCallback() {
            @Override
            public void onSuccess(JSONValue result) {
                String id = Utils.jsonToString(result);
                showEmbeddedGraphHtml(id);
            }
View Full Code Here


            return;
        }

        JSONObject args = new JSONObject();
        args.put("id", new JSONNumber(Integer.parseInt(idString)));
        rpcProxy.rpcCall("get_embedded_query_url_token", args, new JsonRpcCallback() {
            @Override
            public void onSuccess(JSONValue result) {
                String tokenString = Utils.jsonToString(result);
                HistoryToken token;
                try {
View Full Code Here

        args.put("job_id", new JSONNumber(Integer.parseInt(jobIdLbl.getText())));
        args.put("start_date", new JSONString(startDate.getText()));
        args.put("loop_period", new JSONNumber(delayValue));
        args.put("loop_count", new JSONNumber(countValue));

        rpcProxy.rpcCall("create_recurring_run", args, new JsonRpcCallback() {
            @Override
            public void onSuccess(JSONValue result) {
                int id = (int) result.isNumber().doubleValue();
                createRecurringPanel.setVisible(false);
                NotifyManager.getInstance().showMessage("Recurring run " +
View Full Code Here

        loopDelay.setText(Integer.toString(DEFAULT_LOOP_DELAY));
        loopCount.setText(Integer.toString(DEFAULT_LOOP_COUNT));
    }

    private void getServerTime() {
        rpcProxy.rpcCall("get_server_time", null, new JsonRpcCallback() {
            @Override
            public void onSuccess(JSONValue result) {
                String sTime = result.isString().stringValue();
                startDate.setText(sTime);
            }
View Full Code Here

    }

    private void callRemove(JSONObject params) {
        JsonRpcProxy rpcProxy = JsonRpcProxy.getProxy();
        rpcProxy.rpcCall("delete_recurring_runs", params,
                         new JsonRpcCallback() {
            @Override
            public void onSuccess(JSONValue result) {
                    NotifyManager.getInstance().showMessage("Recurring runs " +
                                                            "removed");
                    refresh();
View Full Code Here

                }
                pageParams.put("sort_by", sortList);
            }

            JsonRpcProxy.getProxy().rpcCall(dataMethodName, pageParams,
                                            new JsonRpcCallback() {
                @Override
                public void onSuccess(JSONValue result) {
                    List<JSONObject> resultData = handleJsonResult(result);
                    callback.handlePage(resultData);
                }
View Full Code Here

        }

        @Override
        public void getTotalResultCount(final DataCallback callback) {
            JsonRpcProxy.getProxy().rpcCall(countMethodName, params,
                                            new JsonRpcCallback() {
                @Override
                public void onSuccess(JSONValue result) {
                    int count = (int) result.isNumber().doubleValue();
                    callback.handleTotalResultCount(count);
                }
View Full Code Here

    @Override
    protected void fetchData() {
        JSONObject params = new JSONObject();
        params.put("test_idx", new JSONNumber(testId));
        rpcProxy.rpcCall("get_detailed_test_views", params, new JsonRpcCallback() {
            @Override
            public void onSuccess(JSONValue result) {
                JSONObject test;
                try {
                    test = Utils.getSingleObjectFromArray(result.isArray());
View Full Code Here

    }

    public void handleRemoveLabels(JSONObject testCondition) {
        currentTestCondition = testCondition;

        rpcProxy.rpcCall("get_test_labels_for_tests", currentTestCondition, new JsonRpcCallback() {
            @Override
            public void onSuccess(JSONValue result) {
                String[] labels = Utils.JSONObjectsToStrings(result.isArray(), "name");
                if (labels.length == 0) {
                    notifyManager.showMessage("No labels on selected tests");
View Full Code Here

    }

    private void addLabel(final String name, final SimpleCallback onFinished) {
        JSONObject args = new JSONObject();
        args.put("name", new JSONString(name));
        rpcProxy.rpcCall("add_test_label", args, new JsonRpcCallback() {
            @Override
            public void onSuccess(JSONValue result) {
                onFinished.doCallback(name);
            }
        });
View Full Code Here

TOP

Related Classes of autotest.common.JsonRpcCallback

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.