示例#1
0
  private synchronized Collection<String> execAtomic(String command) {
    if (command.isEmpty()) return Utils.singletonArrayList(OK);

    if (command.trim().isEmpty()) return Utils.singletonArrayList(OK);

    try {
      String[] tokens = Utils.tokenizer(command.trim());
      Collection<String> list = CommandExecuter.getMainExecutor().exec(tokens);
      return list;

    } catch (JGirsException
        | IOException
        | HarcHardwareException
        | IrpMasterException
        | RuntimeException ex) {
      return Utils.singletonArrayList(ERROR + ": " + ex.toString());
    }
  }
示例#2
0
 public synchronized Collection<String> getSubCommandNames(String command) {
   return CommandExecuter.getMainExecutor().getSubCommandNames(command);
 }
示例#3
0
 public synchronized Set<String> getCommandNames() {
   return CommandExecuter.getMainExecutor().getCommandNames();
 }