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()); } }
public synchronized Collection<String> getSubCommandNames(String command) { return CommandExecuter.getMainExecutor().getSubCommandNames(command); }
public synchronized Set<String> getCommandNames() { return CommandExecuter.getMainExecutor().getCommandNames(); }