@SafeVarargs
  public static ServletServerBuilder builder(Configuration conf,
                                             Function<Configuration, ServletServerBuilder.Descriptor>... describe) {
    List<ServletServerBuilder.Descriptor> descriptors = new ArrayList<>();
    Arrays.asList(describe).forEach(functor -> {
      ServletServerBuilder.Descriptor descriptor = functor.apply(conf);
      if (descriptor != null) {
        descriptors.add(descriptor);
      }
    });
    if (!descriptors.isEmpty()) {
      ServletServerBuilder builder = new ServletServerBuilder(conf);
      descriptors.forEach(builder::addServlet);
      return builder;
    }
    return null;
  }
Creates a builder.

@param conf     the configuration
@param describe the functions to call that create servlet descriptors
@return the builder or null if no descriptors
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ServletServerBuilder.java