Examples of Command


Examples of org.rhq.enterprise.communications.command.Command

            String[] remoteCmdArgs = new String[args.length - 1];
            System.arraycopy(args, 1, remoteCmdArgs, 0, remoteCmdArgs.length);

            // use the command line client utility to build the command, but send the command via the agent's client sender
            CmdlineClient client = new CmdlineClient();
            Command command = client.buildCommand(remoteCmdArgs);

            int blast_count = getTestBlastCount(agent);

            for (int i = 0; i < blast_count; i++) {
                agent.getClientCommandSender().sendAsynch(command, new Callback(agent));
View Full Code Here

Examples of org.shiftone.jrat.util.Command

  }

  public void run() {

    LOG.info("run");
    LoggerFactory.executeInThreadScope(new SwingLogTarget(), new Command() {

      protected void run() throws Exception {

        view.execute(new Command() {

          public void run() {

            doRun();
          }
View Full Code Here

Examples of org.sonar.api.utils.command.Command

  public void testAllParams() {
    CommandExecutor commandExecutor = mock(CommandExecutor.class);
    Settings settings = new Settings(new PropertyDefinitions(SvnConfiguration.getProperties()));
    SvnBlameCommand svnBlameCommand = new SvnBlameCommand(commandExecutor, new SvnConfiguration(settings));

    Command commandLine = svnBlameCommand.createCommandLine(baseDir, "src/main/java/Foo.java");
    assertThat(commandLine.toCommandLine()).isEqualTo("svn blame --xml --non-interactive -x -w src/main/java/Foo.java");
    assertThat(commandLine.toString()).isEqualTo("svn blame --xml --non-interactive -x -w src/main/java/Foo.java");

    settings.setProperty(SvnConfiguration.USER_PROP_KEY, "myUser");
    settings.setProperty(SvnConfiguration.PASSWORD_PROP_KEY, "myPass");
    commandLine = svnBlameCommand.createCommandLine(baseDir, "src/main/java/Foo.java");
    assertThat(commandLine.toCommandLine()).isEqualTo("svn blame --xml --non-interactive -x -w --username myUser --password myPass src/main/java/Foo.java");
    assertThat(commandLine.toString()).isEqualTo("svn blame --xml --non-interactive -x -w --username ******** --password ******** src/main/java/Foo.java");

    settings.setProperty(SvnConfiguration.CONFIG_DIR_PROP_KEY, "/home/julien/.svn");
    settings.setProperty(SvnConfiguration.TRUST_SERVER_PROP_KEY, "true");
    settings.setProperty(SvnConfiguration.USE_MERGE_HISTORY_KEY, "true");
    commandLine = svnBlameCommand.createCommandLine(baseDir, "src/main/java/Foo.java");
    assertThat(commandLine.toCommandLine())
      .isEqualTo(
        "svn blame --xml --use-merge-history --non-interactive -x -w --config-dir /home/julien/.svn --username myUser --password myPass --trust-server-cert src/main/java/Foo.java");
    assertThat(commandLine.toString())
      .isEqualTo(
        "svn blame --xml --use-merge-history --non-interactive -x -w --config-dir /home/julien/.svn --username ******** --password ******** --trust-server-cert src/main/java/Foo.java");
  }
View Full Code Here

Examples of org.spout.api.command.Command

    if (Spout.debugMode()) {
      Spout.getLogger().info("Executing: " + command + " " + arguments);
    }

    Command cmd = Spout.getCommandManager().getCommand(command, false);
    if (cmd == null) {
      Spout.getLogger().warning("CommandBlock tried to send unknown command: " + command);
      return;
    }

    try {
      cmd.process(this, args);
    } catch (CommandException e) {
      sendMessage(ChatStyle.RED + e.getMessage());
    }
  }
View Full Code Here

Examples of org.springframework.boot.cli.command.Command

    @Override
    protected void afterRun(Command command) {
    }

    public boolean handleSigInt() {
      Command command = this.lastCommand;
      if (command != null && command instanceof RunProcessCommand) {
        return ((RunProcessCommand) command).handleSigInt();
      }
      return false;
    }
View Full Code Here

Examples of org.teiid.language.Command


public class TestYahooTranslation extends TestCase {
 
    public void helpTestTranslation(String sql, String expectedUrl) throws Exception {
        Command command = FakeTranslationFactory.getInstance().getYahooTranslationUtility().parseCommand(sql);
       
        String url = YahooExecution.translateIntoUrl((Select) command);
        assertEquals("Did not get expected url", expectedUrl, url); //$NON-NLS-1$
    }
View Full Code Here

Examples of org.teiid.query.sql.lang.Command

    if (! (accessNode instanceof AccessNode) || accessNode.getChildren()[0] != null) {
      return null;
    }
   
    // Check that command in access node is a query
    Command command = ((AccessNode)accessNode).getCommand();
    if(command == null || !(command instanceof QueryCommand) || ((command instanceof Query) && ((Query)command).getIsXML())) {
        return null;
    }
   
    QueryCommand queryCommand = (QueryCommand)command;
View Full Code Here

Examples of org.terasology.logic.console.Command

    public CommandInfo(Method method, Object provider) {
        this.method = method;
        this.provider = provider;
        this.name = method.getName();
        Command commandAnnotation = method.getAnnotation(Command.class);
        if (commandAnnotation == null) {
            throw new IllegalArgumentException("Method not annotated with command");
        }
        for (int i = 0; i < method.getParameterTypes().length; ++i) {
            Class<?> parameterType = method.getParameterTypes()[i];
            if (i == method.getParameterTypes().length - 1 && parameterType == EntityRef.class) {
                clientEntityRequired = true;
            } else {
                String paramType = parameterType.getSimpleName().toLowerCase();
                String paramName = getParamName(i);
               
                if (paramName == null) {
                    paramName = "p" + i;
                    logger.warn("Parameter {} in method {} does not have a CommandParam annotation", i, method);
                }

                parameterNames.add(paramName);
                parameterTypes.add(paramType);
            }
        }
        this.runOnServer = commandAnnotation.runOnServer();
        this.shortDescription = commandAnnotation.shortDescription();
        this.helpText = commandAnnotation.helpText();
    }
View Full Code Here

Examples of org.tinyuml.util.Command

  /**
   * Tests the reset method.
   */
  public void testReset() {
    Mock mockCommand2 = mock(Command.class);
    Command command2 = (Command) mockCommand2.proxy();
   
    mockCommand.expects(once()).method("run");
    mockCommand2.expects(once()).method("run");
    mockCommand2.expects(once()).method("undo");
   
View Full Code Here

Examples of org.uberfire.mvp.Command

                           final PlaceRequest place ) {
        this.path = path;
        this.place = place;
        this.isReadOnly = place.getParameter( "readOnly", null ) == null ? false : true;

        this.path.onRename( new Command() {
            @Override
            public void execute() {
                changeTitleNotification.fire( new ChangeTitleWidgetEvent( place, getTitle(), null ) );
            }
        } );
        this.path.onConcurrentUpdate( new ParameterizedCommand<ObservablePath.OnConcurrentUpdateEvent>() {
            @Override
            public void execute( final ObservablePath.OnConcurrentUpdateEvent eventInfo ) {
                view.setConcurrentUpdateSessionInfo(eventInfo);
            }
        } );

        this.path.onConcurrentRename( new ParameterizedCommand<ObservablePath.OnConcurrentRenameEvent>() {
            @Override
            public void execute( final ObservablePath.OnConcurrentRenameEvent info ) {
                newConcurrentRename( info.getSource(),
                                     info.getTarget(),
                                     info.getIdentity(),
                                     new Command() {
                                         @Override
                                         public void execute() {
                                             disableMenus();
                                         }
                                     },
                                     new Command() {
                                         @Override
                                         public void execute() {
                                             reload();
                                         }
                                     }
                                   ).show();
            }
        } );

        this.path.onConcurrentDelete( new ParameterizedCommand<ObservablePath.OnConcurrentDelete>() {
            @Override
            public void execute( final ObservablePath.OnConcurrentDelete info ) {
                newConcurrentDelete( info.getPath(),
                                     info.getIdentity(),
                                     new Command() {
                                         @Override
                                         public void execute() {
                                             disableMenus();
                                         }
                                     },
                                     new Command() {
                                         @Override
                                         public void execute() {
                                             placeManager.closePlace( place );
                                         }
                                     }
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.