Examples of Command


Examples of Galaxy.Tree.Tool.Command.Command

    super(Command.class);
  }
  @Override
  public Map<String, String> mapFromObject(Object o) {
    // TODO Auto-generated method stub
    Command c = (Command) o;
    Map<String, String> myMapping;
    myMapping = new HashMap<String, String>();
    myMapping.put(NAME_TAG, "command");
    if(c.getCommand() != null)
      myMapping.put(VALUE_TAG, c.getCommand());
    if(c.getInterpereter()!= null)
      myMapping.put("interpreter", c.getInterpereter());
    return myMapping;
  }
View Full Code Here

Examples of by.bsuir.hypermarket.command.Command

  private void processRequest(HttpServletRequest request,HttpServletResponse response)
      throws ServletException, IOException {
    CommandParams<HttpServletRequest> commandsParams = new RequestCommandsParams();
    commandsParams.setCommandParamsSource(request);
   
    Command command = RequestHelper.INSTANCE.getCommand(commandsParams);
    String page = command.execute(commandsParams);
   
    request = commandsParams.getCommandParamsSource();
    response.encodeRedirectURL(page);
    RequestDispatcher dispatcher = request.getRequestDispatcher(page);   
    dispatcher.forward(request, response);
View Full Code Here

Examples of cero.ui.commandline.Command

    return instance;
  }

  @Override
  public boolean executer(String parametres) {
    Command help = CommandLineLauncher.getCommands().getCommandeCorrespondante(parametres);
    if(help==null)
      return false;
    System.out.println(help.help());
    return true;
  }
View Full Code Here

Examples of ch.rakudave.jnetmap.controller.command.Command

          Constructor constructor = layoutC.getConstructor(new Class[] {Graph.class});
          Object o = constructor.newInstance(map);
          final Layout<Device, Connection> newLayout = (Layout<Device, Connection>) o;
          newLayout.setInitializer(vv.getGraphLayout());
          newLayout.setSize(vv.getSize());
      map.getHistory().execute(new Command() {
        @Override
        public Object undo() {
          map.setLayout(oldLayout);
          new Animator(new LayoutTransition<Device, Connection>(vv, newLayout, oldLayout)).start();
          vv.getRenderContext().getMultiLayerTransformer().setToIdentity();
View Full Code Here

Examples of com.aerospike.client.command.Command

    this.listener = listener;
   
    // Dispatch asynchronous commands to nodes.
    for (BatchNode batchNode : batchNodes) {     
      for (BatchNamespace batchNamespace : batchNode.batchNamespaces) {
        Command command = new Command();
        command.setBatchGet(batchNamespace, binNames, readAttr);
       
        AsyncBatchGetSequence async = new AsyncBatchGetSequence(this, cluster, (AsyncNode)batchNode.node, binNames, listener);
        async.execute(policy, command);
      }
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.ExternalIoCommandProvider.Command

            return null;
        }
    }

    private String mode(List<Command> commands, String profile) {
        Command found = find(commands, profile);
        assertThat(profile, found, is(notNullValue()));
        // mode argument
        return found.getCommandTokens().get(2);
    }
View Full Code Here

Examples of com.bj58.spat.gaea.server.performance.Command

public class CountTest {

  @Test
  public void testCreateCommand() {
    Count count = new Count();
    Command command1 = count.createCommand("count");
    Assert.assertEquals(CommandType.Count, command1.getCommandType());
    Assert.assertEquals("#all#", command1.getMethod());
    Assert.assertEquals(1, command1.getSecond());
   
   
    Command command2 = count.createCommand("count|second 2|method getInfo");
    Assert.assertEquals(CommandType.Count, command2.getCommandType());
    Assert.assertEquals("getInfo", command2.getMethod());
    Assert.assertEquals(2, command2.getSecond());
  }
View Full Code Here

Examples of com.cloud.agent.api.Command

        try {
            final Command[] cmds = request.getCommands();
            final Answer[] answers = new Answer[cmds.length];

            for (int i = 0; i < cmds.length; i++) {
                final Command cmd = cmds[i];
                Answer answer;
                try {
                  if (s_logger.isDebugEnabled()) {
                    if (!requestLogged) // ensures request is logged only once per method call
                    {
                      String requestMsg = request.toString();
                      if (requestMsg != null) {
                        s_logger.debug("Request:" + requestMsg);
                      }
                      requestLogged = true;
                    }
                    s_logger.debug("Processing command: " + cmd.toString());
                  }

                    if (cmd instanceof CronCommand) {
                        final CronCommand watch = (CronCommand) cmd;
                        scheduleWatch(link, request, watch.getInterval() * 1000, watch.getInterval() * 1000);
                        answer = new Answer(cmd, true, null);
                    } else if (cmd instanceof UpgradeCommand) {
                        final UpgradeCommand upgrade = (UpgradeCommand) cmd;
                        answer = upgradeAgent(upgrade.getUpgradeUrl(), upgrade);
                    } else if (cmd instanceof ShutdownCommand) {
                        ShutdownCommand shutdown = (ShutdownCommand) cmd;
                        s_logger.debug("Received shutdownCommand, due to: " + shutdown.getReason());
                        cancelTasks();
                        _reconnectAllowed = false;
                        answer = new Answer(cmd, true, null);
                    } else if (cmd instanceof ReadyCommand && ((ReadyCommand)cmd).getDetails() != null) {
                    s_logger.debug("Not ready to connect to mgt server: " + ((ReadyCommand)cmd).getDetails());
                    System.exit(1);
                      return;
                    } else if (cmd instanceof MaintainCommand) {
                          s_logger.debug("Received maintainCommand" );
                          cancelTasks();
                          _reconnectAllowed = false;
                          answer = new MaintainAnswer((MaintainCommand)cmd);
                    } else if (cmd instanceof AgentControlCommand) {
                        answer = null;
                        synchronized (_controlListeners) {
                            for (IAgentControlListener listener : _controlListeners) {
                                answer = listener.processControlRequest(request, (AgentControlCommand) cmd);
                                if (answer != null) {
                                    break;
                                }
                            }
                        }

                        if (answer == null) {
                            s_logger.warn("No handler found to process cmd: " + cmd.toString());
                            answer = new AgentControlAnswer(cmd);
                        }

                    } else {
                        if (cmd instanceof ReadyCommand) {
                            processReadyCommand((ReadyCommand)cmd);
                        }
                        _inProgress.incrementAndGet();
                        try {
                            answer = _resource.executeRequest(cmd);
                        } finally {
                            _inProgress.decrementAndGet();
                        }
                        if (answer == null) {
                            s_logger.debug("Response: unsupported command" + cmd.toString());
                            answer = Answer.createUnsupportedCommandAnswer(cmd);
                        }
                    }
                } catch (final Throwable th) {
                    s_logger.warn("Caught: ", th);
View Full Code Here

Examples of com.cloudera.cdk.morphline.api.Command

    return detect(event, includeMetaData, false);
  }
 
  private String detect(Record event, boolean includeMetaData, boolean excludeParameters) throws IOException {
    List key = Arrays.asList(includeMetaData, excludeParameters);
    Command cachedMorphline = morphlineCache.get(key);
    if (cachedMorphline == null) { // avoid recompiling time and again (performance)
      Config override = ConfigFactory.parseString("INCLUDE_META_DATA : " + includeMetaData + "\nEXCLUDE_PARAMETERS : " + excludeParameters);
      cachedMorphline = createMorphline("test-morphlines/detectMimeTypesWithDefaultMimeTypesAndFile", override);
      morphlineCache.put(key, cachedMorphline);
    }
    collector.reset();
    assertTrue(cachedMorphline.process(event));
    String mimeType = (String) collector.getFirstRecord().getFirstValue(Fields.ATTACHMENT_MIME_TYPE);
    return mimeType;
  }
View Full Code Here

Examples of com.cloudera.flume.master.Command

  /**
   * Convert this bean into a command.
   */
  public Command toCommand() {
    String[] args = { physicalNode, logicalNode };
    return new Command("unmap", args);
  }
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.