@Override
    public String toString() {
      String name = null;
      try {
        name = servlet.getServletName() + ":" + port + "/" + path;
      } catch (IllegalStateException ill) {
        // ignore, it may happen if servlet config is not set (yet)
      }
      if (name == null) {
        name = servlet.getClass().getSimpleName();
      }
      return name + ":" + port + "/" + path;
    }
Create a servlet descriptor.

@param port    the servlet port (or 0 if system allocated)
@param path    the servlet path
@param servlet the servlet instance
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ServletServerBuilder.java