/**
  * Processing the {@value #OH_PROP} configuration property, if there is one.
  *
  * @param iniFile INI configuration file being processed
  * @param configSection current configuration section being processed
  * @param configBuilder current builder being constructed from the parser
  * @return obligation processing service
  * @throws ConfigurationException thrown if there is a problem building the obligations handlers
  */
 public static ObligationService processObligationHandlers(
     Ini iniFile, Ini.Section configSection, AbstractConfigurationBuilder<?> configBuilder)
     throws ConfigurationException {
   ObligationService service = new ObligationService();
   if (configSection.containsKey(OH_PROP)) {
     StringTokenizer obligationHandlers = new StringTokenizer(configSection.get(OH_PROP), " ");
     String obligationHandlerName;
     while (obligationHandlers.hasMoreTokens()) {
       obligationHandlerName = Strings.safeTrimOrNullString(obligationHandlers.nextToken());
       if (!iniFile.containsKey(obligationHandlerName)) {
         String errorMsg =
             "INI configuration file does not contain a configuration section for obligation handler "
                 + obligationHandlerName;
         LOG.error(errorMsg);
         throw new ConfigurationException(errorMsg);
       }
       if (obligationHandlerName != null) {
         service.addObligationhandler(
             buildObligationHandler(iniFile.get(obligationHandlerName), configBuilder));
         LOG.info("Added obligation handler: {}", obligationHandlerName);
       }
     }
   }
   return service;
 }
  /**
   * Constructor.
   *
   * @param hostname hostname upon which the admin service listens
   * @param port port upon which the admin service listens
   * @param password password required to execute admin commands, may be null if no password is
   *     required
   */
  public JettyAdminService(String hostname, int port, String password) {
    adminHost = Strings.safeTrimOrNullString(hostname);
    if (adminHost == null) {
      throw new IllegalArgumentException("Admin service hostname may not be null");
    }

    adminPort = port;
    if (adminPort < 1) {
      throw new IllegalArgumentException("Admin port must be greater than 0");
    }

    if (adminPort > 65535) {
      throw new IllegalArgumentException("Admin port must be less than 65536");
    }

    adminPassword = Strings.safeTrimOrNullString(password);

    adminService = buildAdminService();
    adminCommands = new LazyList<AbstractAdminCommand>();
    shutdownTasks = new LazyList<Runnable>();
  }