/**
   * Creates a ServerDescriptor object based on the configuration that we read using the provided
   * InitialLdapContext.
   *
   * @param ctx the InitialLdapContext that will be used to read the configuration of the server.
   * @param filter the topology cache filter describing the information that must be retrieved.
   * @return a ServerDescriptor object that corresponds to the read configuration.
   * @throws NamingException if a problem occurred reading the server configuration.
   */
  public static ServerDescriptor createStandalone(
      InitialLdapContext ctx, TopologyCacheFilter filter) throws NamingException {
    ServerDescriptor desc = new ServerDescriptor();

    updateLdapConfiguration(desc, ctx, filter);
    updateAdminConnectorConfiguration(desc, ctx, filter);
    updateJmxConfiguration(desc, ctx, filter);
    updateReplicas(desc, ctx, filter);
    updateReplication(desc, ctx, filter);
    updatePublicKeyCertificate(desc, ctx, filter);
    updateMiscellaneous(desc, ctx, filter);

    desc.serverProperties.put(ServerProperty.HOST_NAME, ConnectionUtils.getHostName(ctx));

    return desc;
  }