Examples of Command


Examples of org.ugate.service.entity.Command

      }
      if (msgRawContent != null) {
        rawCommands.addAll(Arrays.asList(msgRawContent.trim().split(ActorType.MAIL_COMMAND_DELIMITER)));
      }
      int intCmd = -1;
      Command cmd = null;
      for (String rawCmd : rawCommands) {
        try {
          intCmd = Integer.parseInt(rawCmd);
        } catch (NumberFormatException e) {
          log.warn("Non-numeric command received: " + rawCmd, e);
View Full Code Here

Examples of org.uiautomation.ios.utils.Command

        cmd.add("-c");
        cmd.add(script);
        for (int i = 0; i < args.length(); i++) {
            cmd.add(args.getString(i));
        }
        Command command = new Command(cmd, true);
        command.start();
        int exitCode = command.waitFor(60 * 1000);
        JSONObject jo = new JSONObject();
        jo.put("exitCode", exitCode);
        jo.put("stdout", toOutput(command.getStdOut()));
        jo.put("stderr", toOutput(command.getErr()));

        Response resp = new Response();
        resp.setSessionId(getSession().getSessionId());
        resp.setStatus(0);
        resp.setValue(jo);
View Full Code Here

Examples of org.vaadin.console.Console.Command

        // Publish the methods in the Console class itself for testing purposes.
        console.addCommandProvider(inspector = new ObjectInspector(console));

        // Add help command
        Command helpCommand = new Console.Command() {
            private static final long serialVersionUID = 2838665604270727844L;

            public String getUsage(Console console, String[] argv) {
                return argv[0] + " <command>";
            }

            public Object execute(Console console, String[] argv)
                    throws Exception {
                if (argv.length == 2) {
                    Command hc = console.getCommand(argv[1]);
                    ArrayList<String> cmdArgv = new ArrayList<String>(Arrays
                            .asList(argv));
                    cmdArgv.remove(0);
                    return "Usage: "
                            + hc.getUsage(console, cmdArgv
                                    .toArray(new String[] {}));
                }
                return listAvailableCommands();
            }
        };

        // Bind the same command with multiple names
        console.addCommand("help", helpCommand);
        console.addCommand("info", helpCommand);
        console.addCommand("man", helpCommand);
        // #

        // # 2
        Command systemCommand = new Command() {
            private static final long serialVersionUID = -5733237166568671987L;

            public Object execute(Console console, String[] argv)
                    throws Exception {
                Process p = Runtime.getRuntime().exec(argv);
View Full Code Here

Examples of org.waveprotocol.wave.model.util.Scheduler.Command

  private FakeNativeScheduler fakeNativeScheduler;
  private Scheduler scheduler;

  @Override
  protected void setUp() {
    fakeComamnd = new Command() {
      @Override
      public void execute() {
      }
    };
    fakeNativeScheduler = new FakeNativeScheduler();
View Full Code Here

Examples of org.xmatthew.spy2servers.command.Command

        if (args != null && args.length == 1
                && (args[0].equals(START_C) || args[0].equals(STOP_C))) {
            control = args[0];
        }
   
        Command command;
        if (START_C.equals(control)) {
            LOGGER.info("Server starting...");
            command = new StartCommand();
        } else {
            LOGGER.info("Stop server starting...");
            command = new ShutdownCommand();
        }
        command.execute(new ArrayList<String>());
       
        System.exit(0);
  }
View Full Code Here

Examples of org.yaac.server.egql.Command

  }

  @Override
  public Response execute(Request req) {
    try {
      Command cmd = EGQLUtil.parser(req.getCommand()).command().cmd;
     
      // validate all statements
      for (Statement stmt : cmd.getStatements()) {
        stmt.validate();
      }
     
      // validation passed, kick off all statements
      Response resp = new Response();
      for (Statement stmt : cmd.getStatements()) {
       
        // TODO : how to handle exceptions for simple statement?
        if (stmt.isSimpleStatement()) {
          if (stmt instanceof InsertStatement) {
            InsertStatement insertStmt = (InsertStatement) stmt;
View Full Code Here

Examples of org.zkoss.zss.ui.au.in.Command

        org.zkoss.zk.ui.event.Events.postEvent(evt);
      }
      return;
    }
   
    Command command = InnerEvts.getCommand(cmd);
    if (command != null) {
      command.process(request);
      return;
    }
   
    super.service(request, everError);
  }
View Full Code Here

Examples of pl.com.bottega.cqrs.annotations.Command

  private boolean isUnique(Object command) {
    if (!command.getClass().isAnnotationPresent(Command.class))
      return false;

    Command commandAnnotation = command.getClass().getAnnotation(
        Command.class);

    return commandAnnotation.unique();
  }
View Full Code Here

Examples of presenter.command.Command

            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
                    view.getViewState().salvaDados();
                    Command salvarCommand = new SalvarArvoresCommand(pView, "Salvando o projeto...");
                    salvarCommand.execute();
                } catch (Exception ex) {
                    ErrorInfo info = new ErrorInfo("Erro", ex.getMessage(), null, "category", ex, Level.SEVERE, null);
                    JXErrorPane.showDialog(view, info);
                }
            }
        });



        view.getBtnNovaArvore().addActionListener(new java.awt.event.ActionListener() {

            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                view.getViewState().novaArvore();
                cenarioTM.addLinha();
                GUIUtils.selectAndScroll(view.getGrid(), view.getGrid().getRowCount() - 1);
            }
        });

        view.getBtnRemoverArvore().addActionListener(new java.awt.event.ActionListener() {

            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                removeArvore();
            }
        });

        view.getBtnCancelar().addActionListener(new java.awt.event.ActionListener() {

            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                view.getViewState().cancela();
            }
        });

        view.getBtnImportar().addActionListener(new java.awt.event.ActionListener() {

            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
                    Command importarArvores = new ImportarArvoresCommand(pView, "Gravando dados importados...");
                    importarArvores.execute();
                } catch (Exception ex) {
                    ErrorInfo info = new ErrorInfo("Erro", ex.getMessage(), null, "category", ex, Level.SEVERE, null);
                    JXErrorPane.showDialog(view, info);
                }
            }
View Full Code Here

Examples of redis.Command

   * @param value1
   * @return IntegerReply
   */
  public IntegerReply append(Object key0, Object value1) throws RedisException {
    if (version < APPEND_VERSION) throw new RedisException("Server does not support APPEND");
    return (IntegerReply) execute(APPEND, new Command(APPEND_BYTES, key0, value1));
  }
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.