Examples of executeAndReturnOutput()


Examples of com.sun.enterprise.admin.cli.remote.RemoteCommand.executeAndReturnOutput()

     * Execute the actual stop-domain command.
     */
    protected void doCommand() throws CommandException {
        // run the remote stop-domain command and throw away the output
        RemoteCommand cmd = new RemoteCommand(getName(), programOpts, env);
        cmd.executeAndReturnOutput("stop-domain", "--force", force.toString());
        waitForDeath();

        if (kill && local) {
            kill();
        }
View Full Code Here

Examples of com.sun.enterprise.admin.cli.remote.RemoteCommand.executeAndReturnOutput()

        /*
         * Now get the list of remote commands.
         */
        RemoteCommand cmd =
            new RemoteCommand("list-commands", po, env);
        String cmds = cmd.executeAndReturnOutput("list-commands");
        List<String> rcmds = new ArrayList<String>();
        BufferedReader r = new BufferedReader(new StringReader(cmds));
        String line;

        /*
 
View Full Code Here

Examples of com.sun.enterprise.admin.cli.remote.RemoteCommand.executeAndReturnOutput()

                    );
                Environment env = new Environment();
                ProgramOptions po = prepareRemoteCommandProgramOptions(env);
                RemoteCommand rc =
                    new RemoteCommand(commandName, po, env, "jsr-88/xml", baos);
                rc.executeAndReturnOutput(commandArgs);
                DFDeploymentStatus status = CommandXMLResultParser.parse(new ByteArrayInputStream(baos.toByteArray()));
                return status;
            } catch (Exception ex) {
                throw new RuntimeException(ex);
            }
View Full Code Here

Examples of com.sun.enterprise.admin.cli.remote.RemoteCommand.executeAndReturnOutput()

   
    protected String getNodeInstallDir() throws CommandException {
        String installDir = null;
        try {
            RemoteCommand rc = new RemoteCommand("get", this.programOpts, this.env);
            String s = rc.executeAndReturnOutput("get", "nodes.node." + node + ".install-dir");
            if (s != null) {
                installDir = s.substring(s.indexOf("=") + 1);
            }
        } catch (CommandException ce) {
            // ignore
View Full Code Here

Examples of com.sun.enterprise.admin.cli.remote.RemoteCommand.executeAndReturnOutput()

    private boolean isRegisteredToDAS() {
        boolean isRegistered = false;
        try {
            RemoteCommand rc = new RemoteCommand("get", this.programOpts, this.env);
            rc.executeAndReturnOutput("get", INSTANCE_DOTTED_NAME);
            isRegistered = true;
        } catch (CommandException ex) {
            logger.finer(instanceName +" is not yet registered to DAS.");
            isRegistered=false;
        }
View Full Code Here

Examples of com.sun.enterprise.admin.cli.remote.RemoteCommand.executeAndReturnOutput()

    private void setRendezvousOccurred(String rendezVal) throws CommandException {
        String dottedName = RENDEZVOUS_DOTTED_NAME + "=" + rendezVal;
        RemoteCommand rc = new RemoteCommand("set", this.programOpts, this.env);
        logger.finer("Setting rendezvousOccurred to " + rendezVal + " for instance " + instanceName);
        rc.executeAndReturnOutput("set", dottedName);
    }

    /* installdir is product install dir (parent of glassfish install root) */
    private int createNodeImplicit(String name, String installdir, String nodeHost) throws CommandException {
        ArrayList<String> argsList = new ArrayList<String>();
View Full Code Here

Examples of com.sun.enterprise.admin.cli.remote.RemoteCommand.executeAndReturnOutput()

            try {
                RemoteCommand cmd =
                    new RemoteCommand("_get-restart-required",
                                        programOpts, env);
                String restartRequired =
                    cmd.executeAndReturnOutput("_get-restart-required");
                if (Boolean.parseBoolean(restartRequired.trim()))
                    return strings.get("list.domains.StatusRestartRequired");
            } catch (Exception ex) {
            }
            return strings.get("list.domains.StatusRunning");
View Full Code Here

Examples of com.sun.enterprise.admin.cli.remote.RemoteCommand.executeAndReturnOutput()

                    );
                Environment env = new Environment();
                ProgramOptions po = prepareRemoteCommandProgramOptions(env);
                RemoteCommand rc =
                    new RemoteCommand(commandName, po, env, "jsr-88/xml", baos);
                rc.executeAndReturnOutput(commandArgs);
                DFDeploymentStatus status = CommandXMLResultParser.parse(new ByteArrayInputStream(baos.toByteArray()));
                return status;
            } catch (Exception ex) {
                throw new RuntimeException(ex);
            }
View Full Code Here

Examples of com.sun.enterprise.admin.cli.remote.RemoteCommand.executeAndReturnOutput()

    private boolean canSuspend() {

        try {
            RemoteCommand cmd = new RemoteCommand("list-commands",
                                                  programOpts, env);
            String response = cmd.executeAndReturnOutput("list-commands");

            if (response.indexOf("suspend-domain") >= 0)
                return true;
        } catch (Exception e) {
            logger.info("Exception while probing DAS (list-commands): " +
View Full Code Here

Examples of com.sun.enterprise.admin.cli.remote.RemoteCommand.executeAndReturnOutput()

    private boolean isSuspended() {

        try {
            RemoteCommand cmd = new RemoteCommand("suspend-domain",
                                                  programOpts, env);
            String response = cmd.executeAndReturnOutput("suspend-domain",
                                                         "--_test=true");

            if (response.indexOf("SUSPENDED=TRUE") >= 0)
                return true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.