Package com.sun.enterprise.admin.util

Examples of com.sun.enterprise.admin.util.InstanceCommandExecutor


    }

    private void getFutureResult() {
        try {
            InstanceCommandResult r = future.get(timeoutInMsec, TimeUnit.MILLISECONDS);
            InstanceCommandExecutor res = (InstanceCommandExecutor) r.getInstanceCommand();
            String instanceLocation = res.getCommandOutput();
            // Remove the pesky \n out
            instanceLocation = (instanceLocation == null) ? "" : instanceLocation.trim();

            if ((!instanceLocation.endsWith(res.getServer().getName()))
                    || (res.getReport().getActionExitCode() != ActionReport.ExitCode.SUCCESS)) {
                uptime = -1;
                state = NOT_RUNNING;
                running = false;
                pid = -1;
                ssState = stateService.setState(name, InstanceState.StateType.NOT_RUNNING, false);
            }
            else {
                Properties props = res.getReport().getTopMessagePart().getProps();
                String uptimeStr = props.getProperty("Uptime");
                String pidstr = props.getProperty("Pid");
                String restartstr = props.getProperty("Restart-Required");

                try {
View Full Code Here


        try {
            ActionReport aReport = report.addSubActionsReport();
            InstanceCommandResult aResult = new InstanceCommandResult();
            ParameterMap map = new ParameterMap();
            map.set("type", "terse");
            InstanceCommandExecutor ice =
                    new InstanceCommandExecutor(habitat, "__locations", FailurePolicy.Error, FailurePolicy.Error,
                    svr, host, port, logger, map, aReport, aResult);
            return stateService.submitJob(svr, ice, aResult);
            /*
            String ret = rac.executeCommand(map).trim();

View Full Code Here

    }

    private void getFutureResult() {
        try {
            InstanceCommandResult r = future.get(timeoutInMsec, TimeUnit.SECONDS);
            InstanceCommandExecutor res = (InstanceCommandExecutor) r.getInstanceCommand();
            String instanceLocation = res.getCommandOutput();
            // Remove the pesky \n out
            instanceLocation = (instanceLocation == null) ? "" : instanceLocation.trim();

            if ((!instanceLocation.endsWith(res.getServer().getName()))
                    || (res.getReport().getActionExitCode() != ActionReport.ExitCode.SUCCESS)) {
                uptime = -1;
                state = NOT_RUNNING;
                running = false;
                pid = -1;
                ssState = stateService.setState(name, InstanceState.StateType.NOT_RUNNING, false);
            }
            else {
                Properties props = res.getReport().getTopMessagePart().getProps();
                String uptimeStr = props.getProperty("Uptime");
                String pidstr = props.getProperty("Pid");
                String restartstr = props.getProperty("Restart-Required");

                try {
View Full Code Here

        try {
            ActionReport aReport = report.addSubActionsReport();
            InstanceCommandResult aResult = new InstanceCommandResult();
            ParameterMap map = new ParameterMap();
            map.set("type", "terse");
            InstanceCommandExecutor ice =
                    new InstanceCommandExecutor(habitat, "__locations", FailurePolicy.Error, FailurePolicy.Error,
                    svr, host, port, logger, map, aReport, aResult);
            return stateService.submitJob(svr, ice, aResult);
            /*
            String ret = rac.executeCommand(map).trim();

View Full Code Here

    }

    private void getFutureResult() {
        try {
            InstanceCommandResult r = future.get(timeoutInMsec, TimeUnit.MILLISECONDS);
            InstanceCommandExecutor res = (InstanceCommandExecutor) r.getInstanceCommand();
            String instanceLocation = res.getCommandOutput();
            // Remove the pesky \n out
            instanceLocation = (instanceLocation == null) ? "" : instanceLocation.trim();

            if ((!instanceLocation.endsWith(res.getServer().getName()))
                    || (res.getReport().getActionExitCode() != ActionReport.ExitCode.SUCCESS)) {
                uptime = -1;
                state = NOT_RUNNING;
                running = false;
                pid = -1;
                ssState = stateService.setState(name, InstanceState.StateType.NOT_RUNNING, false);
            }
            else {
                Properties props = res.getReport().getTopMessagePart().getProps();
                String uptimeStr = props.getProperty("Uptime");
                String pidstr = props.getProperty("Pid");
                String restartstr = props.getProperty("Restart-Required");

                try {
View Full Code Here

        try {
            ActionReport aReport = report.addSubActionsReport();
            InstanceCommandResult aResult = new InstanceCommandResult();
            ParameterMap map = new ParameterMap();
            map.set("type", "terse");
            InstanceCommandExecutor ice =
                    new InstanceCommandExecutor(habitat, "__locations", FailurePolicy.Error, FailurePolicy.Error,
                    svr, host, port, logger, map, aReport, aResult);
            return stateService.submitJob(svr, ice, aResult);
            /*
            String ret = rac.executeCommand(map).trim();

View Full Code Here

TOP

Related Classes of com.sun.enterprise.admin.util.InstanceCommandExecutor

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.