code: public synchronized void addCommand(final CommandImpl command) throws DevFailed {
          CommandImpl result = null;
          for (final CommandImpl cmd : commandList) {
              if (command.getName().equalsIgnoreCase(cmd.getName())) {
                  result = command;
                  break;
              }
          }
          if (result == null) {
              commandList.add(command);
              // set default polling configuration
              if (cmdPollRingDepth.containsKey(command.getName().toLowerCase(Locale.ENGLISH))) {
                  command.setPollRingDepth(cmdPollRingDepth.get(command.getName().toLowerCase(Locale.ENGLISH)));
              } else {
                  command.setPollRingDepth(pollRingDepth);
              }
          }
      }
docs: add a command
  
  @param command the new command
  @throws DevFailed