mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
27.25.2009 e38f6f28245cc16aa183e923039dfaef931080c3
opendj-sdk/opends/src/ads/org/opends/admin/ads/ServerDescriptor.java
@@ -31,6 +31,7 @@
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
@@ -432,6 +433,30 @@
  }
  /**
   * Returns the list of enabled administration ports.
   * @return the list of enabled administration ports.
   */
  public List<Integer> getEnabledAdministrationPorts()
  {
    List<Integer> ports = new ArrayList<Integer>(1);
    ArrayList s = (ArrayList)serverProperties.get(
        ServerProperty.ADMIN_ENABLED);
    ArrayList p = (ArrayList)serverProperties.get(
        ServerProperty.ADMIN_PORT);
    if (s != null)
    {
      for (int i=0; i<s.size(); i++)
      {
        if (Boolean.TRUE.equals(s.get(i)))
        {
          ports.add((Integer)p.get(i));
        }
      }
    }
    return ports;
  }
  /**
   * Returns a String of type host-name:port-number for the server.  If
   * the provided securePreferred is set to true the port that will be used
   * will be the administration connector port.