Package com.sun.enterprise.admin.cli.remote

Examples of com.sun.enterprise.admin.cli.remote.RemoteCommand


                    programOpts.getHost(), "" + programOpts.getPort());
            throw new CommandException(newString);
        }

        if (isRegisteredToDas()) {
            RemoteCommand rc = new RemoteCommand("_unregister-instance", programOpts, env);
            rc.execute("_unregister-instance",
                    "--node", getServerDirs().getServerParentDir().getName(),
                    getServerDirs().getServerName());
        }
    }
View Full Code Here


     * If the instance is not registered on DAS (server xml entry doesn't exist
     * in domain.xml), the get command will throw a CommandException
     */
    private boolean isRegisteredToDas() {
        boolean isRegistered = false;
        RemoteCommand rc = null;
        String INSTANCE_DOTTED_NAME = "servers.server." + instanceName;
        try {
            rc = new RemoteCommand("get", this.programOpts, this.env);
            rc.executeAndReturnOutput("get", INSTANCE_DOTTED_NAME);
            isRegistered = true;
        } catch (CommandException ce) {
            isRegistered = false;
        }
        return isRegistered;
View Full Code Here

    }

    private void setRendezvousOccurred(String rendezVal) {
        String dottedName = RENDEZVOUS_DOTTED_NAME + "=" + rendezVal;
        try {
            RemoteCommand rc = new RemoteCommand("set", this.programOpts, this.env);
            rc.executeAndReturnOutput("set", dottedName);
        } catch (CommandException ex) {
            logger.warning(Strings.get("import.sync.bundle.completeRegistrationFailed", dottedName));
        }
    }
View Full Code Here

        }
        return exitCode;
    }

    private int bootstrapSecureAdminFiles() throws CommandException {
        RemoteCommand rc = new RemoteCommand("_bootstrap-secure-admin", this.programOpts, this.env);
        rc.setFileOutputDirectory(instanceDir);
        logger.finest("Download root for bootstrapping: " + instanceDir.getAbsolutePath());
        final int result = rc.execute(new String[] {"_bootstrap-secure-admin"});
        return result;
    }
View Full Code Here

        argsList.add(this.instanceName);

        String[] argsArray = new String[argsList.size()];
        argsArray = argsList.toArray(argsArray);

        RemoteCommand rc = new RemoteCommand("_register-instance", this.programOpts, this.env);
        return rc.execute(argsArray);
    }
View Full Code Here

    }

    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

        return isRegistered;
    }

    private boolean rendezvousOccurred() {
        boolean rendezvousOccurred = false;
        RemoteCommand rc = null;
        try {
            rc = new RemoteCommand("get", this.programOpts, this.env);
            Map<String, String> map = rc.executeAndReturnAttributes("get", RENDEZVOUS_DOTTED_NAME);
            String output = map.get("children");
            String val = output.substring(output.indexOf("=") + 1);
            rendezvousOccurred = Boolean.parseBoolean(val);
            logger.finer("rendezvousOccurred = " + val + " for instance " + instanceName);
        } catch (CommandException ce) {
View Full Code Here

        return rendezvousOccurred;
    }

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

        argsList.add(nodeHost);

        String[] argsArray = new String[argsList.size()];
        argsArray = argsList.toArray(argsArray);

        RemoteCommand rc = new RemoteCommand("_create-node-implicit", this.programOpts, this.env);
        return rc.execute(argsArray);
    }
View Full Code Here

        argsList.add(name);

        String[] argsArray = new String[argsList.size()];
        argsArray = argsList.toArray(argsArray);

        RemoteCommand rc = new RemoteCommand("_validate-node", this.programOpts, this.env);
        return rc.execute(argsArray);
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.admin.cli.remote.RemoteCommand

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.