Examples of RemoteCommand


Examples of br.com.objectos.way.ssh.RemoteCommand

      WaySSH ssh = WaySSH.ssh()
          .toHost(workstation.getName())
          .connect();

      String cmd = String.format("sudo tar xpf - -C %s", target.getAbsolutePath());
      RemoteCommand command = ssh.execute(cmd, is);
      List<Exception> exceptions = command.getExceptions();
      for (Exception exception : exceptions) {
        exception.printStackTrace();
      }

      ssh.disconnect();
View Full Code Here

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

   
    private static CLICommand getRemoteCommand(String name, ProgramOptions po, Environment env) throws CommandException {
        if (useRest()) {
            return new RemoteCLICommand(name, po, env);
        } else {
            return new RemoteCommand(name, po, env);
        }
    }
View Full Code Here

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

        if (cmd != null)
            return cmd;

        // nope, must be a remote command
        logger.finer("Assuming it's a remote command: " + name);
        return new RemoteCommand(name,
            habitat.getComponent(ProgramOptions.class),
            habitat.getComponent(Environment.class));
    }
View Full Code Here

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

        ourDir = getUniquePath(ourDir);
        logger.finer("Check if server is at location " + ourDir);

        try {
            RemoteCommand cmd =
                    new RemoteCommand("__locations", programOpts, env);
            Map<String, String> attrs =
                    cmd.executeAndReturnAttributes(new String[]{"__locations"});
            String theirDirPath = attrs.get(directoryKey);
            logger.finer("Remote server has root directory " + theirDirPath);

            if (ok(theirDirPath)) {
                File theirDir = getUniquePath(new File(theirDirPath));
View Full Code Here

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

    /**
     * Get uptime from the server.
     */
    protected final long getUptime() throws CommandException {
        RemoteCommand cmd = new RemoteCommand("uptime", programOpts, env);
        String up = cmd.executeAndReturnOutput("uptime", "--milliseconds").trim();
        long up_ms = parseUptime(up);

        if (up_ms <= 0) {
            throw new CommandException(strings.get("restart.dasNotRunning"));
        }
View Full Code Here

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

     * deleted it or made it unreadable.
     */
    protected final boolean isRestartable() throws CommandException {
        // false negative is worse than false positive.
        // there is one and only one case where we return false
        RemoteCommand cmd = new RemoteCommand("_get-runtime-info", programOpts, env);
        Map<String, String> atts = cmd.executeAndReturnAttributes("_get-runtime-info");

        if (atts != null) {
            String val = atts.get("restartable_value");

            if (ok(val) && val.equals("false"))
View Full Code Here

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

        }

        /*
         * 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

            this.type = type;
        if ((filter != null) && (filter.length() > 0))
            this.filter = filter;
        this.fileName = fileName;
        this.remoteArgs = remoteArgs;
        cmd = new RemoteCommand(remoteArgs[0], programOpts, env);
        displayHeader(type);

    }
View Full Code Here

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

    /**
     * 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 net.sf.jftp.gui.tasks.RemoteCommand

          
            int opt = JOptionPane.showOptionDialog(this, "Would you like to type one command or to open a shell?","Question", JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE,
                new ImageIcon(HImage.getImage(this, Settings.helpImage)), new String[] {"Shell","Command", "Cancel"}, "Command");
           
            if(opt == 1) {
              RemoteCommand rc = new RemoteCommand();
            }
            else if(opt == 0) {
              FtpConnection conn = (FtpConnection) con;
              Shell s = new Shell(conn.getCommandInputReader(), conn.getCommandOutputStream());
            }
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.