Examples of Command


Examples of org.apache.ftpserver.command.Command

        }
        argument = argument.toUpperCase();

        // call appropriate command method
        String optsRequest = "OPTS_" + argument;
        Command command = COMMAND_MAP.get(optsRequest);
        try {
            if (command != null) {
                command.execute(session, context, request);
            } else {
                session.resetState();
                session.write(LocalizedFtpReply.translate(session, request, context,
                        FtpReply.REPLY_502_COMMAND_NOT_IMPLEMENTED,
                        "OPTS.not.implemented", argument));
View Full Code Here

Examples of org.apache.ftpserver.interfaces.Command

        }
        argument = argument.toUpperCase();
       
        // call appropriate command method
        String optsRequest = "OPTS_" + argument;
        Command command = (Command)COMMAND_MAP.get( optsRequest );
        try {
            if(command != null) {
                command.execute(session, context, request);
            }
            else {
                session.resetState();
                session.write(FtpReplyUtil.translate(session, request, context, FtpReply.REPLY_502_COMMAND_NOT_IMPLEMENTED, "OPTS.not.implemented", argument));
            }
View Full Code Here

Examples of org.apache.geronimo.gshell.command.Command

                    Node n = gn.find(cmdId);
                    if (n == null) {
                        n = layout.find(cmdId);
                    }
                    CommandContext ctx = commandContext;
                    Command cmd;
                    if (n instanceof CommandNode) {
                        cmd = lookup(((CommandNode) n).getId());
                    } else if (n instanceof GroupNode) {
                        cmd = new GroupCommand(cmdId, (GroupNode) n);
                    } else if (n instanceof AliasNode) {
                        cmd = lookup(((AliasNode) n).getCommand().substring(ALIAS_PREFIX.length()));
                    } else {
                        throw new IllegalStateException("Unrecognized node type: " + n.getClass().getName());
                    }
                    return cmd.execute(ctx, Arguments.shift(objects));
                } finally {
                    env.getVariables().unset(CURRENT_NODE);
                }
            }
            return SUCCESS;
View Full Code Here

Examples of org.apache.hadoop.fs.shell.Command

  }

  private void printInfo(PrintStream out, String cmd, boolean showHelp) {
    if (cmd != null) {
      // display help or usage for one command
      Command instance = commandFactory.getInstance("-" + cmd);
      if (instance == null) {
        throw new UnknownCommandException(cmd);
      }
      if (showHelp) {
        printInstanceHelp(out, instance);
      } else {
        printInstanceUsage(out, instance);
      }
    } else {
      // display help or usage for all commands
      out.println(usagePrefix);
     
      // display list of short usages
      ArrayList<Command> instances = new ArrayList<Command>();
      for (String name : commandFactory.getNames()) {
        Command instance = commandFactory.getInstance(name);
        if (!instance.isDeprecated()) {
          out.println("\t[" + instance.getUsage() + "]");
          instances.add(instance);
        }
      }
      // display long descriptions for each command
      if (showHelp) {
View Full Code Here

Examples of org.apache.hadoop.hbase.hql.Command

  if (query.length() > 0) {
      out.write("\n <hr/>\n ");

    HQLParser parser = new HQLParser(query, out, new HtmlTableFormatter(out));
    Command cmd = parser.terminatedCommand();
    if (cmd.getCommandType() != Command.CommandType.SELECT) {
      out.write("\n  <p>");
      out.print( cmd.getCommandType() );
      out.write("-type commands are disabled in this interface.</p>\n ");

    } else {
      ReturnMsg rm = cmd.execute(new HBaseConfiguration());
      String summary = rm == null? "": rm.toString();
      out.write("\n  <p>");
      out.print( summary );
      out.write("</p>\n ");
View Full Code Here

Examples of org.apache.hadoop.hbase.shell.Command

  if (query.length() > 0) {
      out.write("\n <hr/>\n ");

    Parser parser = new Parser(query, out, new HtmlTableFormatter(out));
    Command cmd = parser.terminatedCommand();
    if (cmd.getCommandType() != Command.CommandType.SELECT) {
      out.write("\n  <p>");
      out.print( cmd.getCommandType() );
      out.write("-type commands are disabled in this interface.</p>\n ");

    } else {
      ReturnMsg rm = cmd.execute(new HBaseConfiguration());
      String summary = rm == null? "": rm.toString();
      out.write("\n  <p>");
      out.print( summary );
      out.write("</p>\n ");
View Full Code Here

Examples of org.apache.hedwig.admin.console.HedwigCommands.COMMAND

        long elapsedTime = System.currentTimeMillis() - startTime;
        if (inConsole) {
            if (success) {
                System.out.println("Finished " + ((double)elapsedTime / 1000) + " s.");
            } else {
                COMMAND c = getHedwigCommands().get(cmd);
                if (c != null) {
                    c.printUsage();
                }
            }
        }
        return success;
    }
View Full Code Here

Examples of org.apache.isis.applib.annotation.Command

            return;
        }
        if(actionSemanticsFacet.value() == Of.SAFE && categorization == ActionCategorization.IGNORE_SAFE) {
            return;
        }
        final Command annotation = Annotations.getAnnotation(method, Command.class);
        FacetUtil.addFacet(create(annotation, facetHolder));
    }
View Full Code Here

Examples of org.apache.isis.applib.services.command.Command

        final CommandContext commandContext = getServiceOrNull(CommandContext.class);
        if(commandContext == null) {
            return;
        }
        final CommandService commandService = getServiceOrNull(CommandService.class);
        final Command command =
                commandService != null
                    ? commandService.create()
                    : new CommandDefault();
        commandContext.setCommand(command);

        if(command.getTimestamp() == null) {
            command.setTimestamp(Clock.getTimeAsJavaSqlTimestamp());
        }
        if(command.getUser() == null) {
            command.setUser(getAuthenticationSession().getUserName());
        }
       
        // the remaining properties are set further down the call-stack, if an action is actually performed
    }
View Full Code Here

Examples of org.apache.jmeter.gui.action.Command

            ReportGuiPackage.getInstance().updateCurrentNode();
            Set<Command> commandObjects = commands.get(e.getActionCommand());
            Iterator<Command> iter = commandObjects.iterator();
            while (iter.hasNext()) {
                try {
                    Command c = iter.next();
                    preActionPerformed(c.getClass(), e);
                    c.doAction(e);
                    postActionPerformed(c.getClass(), e);
                } catch (IllegalUserActionException err) {
                    JMeterUtils.reportErrorToUser(err.toString());
                } catch (Exception err) {
                    log.error("", err);
                }
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.