Class JettyUtils

java.lang.Object
org.apache.druid.server.JettyUtils

public class JettyUtils extends Object
  • Constructor Details

    • JettyUtils

      public JettyUtils()
  • Method Details

    • concatenateForRewrite

      @Nullable public static String concatenateForRewrite(String base, String encodedPath, @Nullable String encodedQueryString)
      Concatenate URI parts, in a way that is useful for proxy servlets.
      Parameters:
      base - base part of the uri, like http://example.com (no trailing slash)
      encodedPath - encoded path, like you would get from HttpServletRequest's getRequestURI. Must start with a slash.
      encodedQueryString - encoded query string, like you would get from HttpServletRequest's getQueryString
      Returns:
      rewritten target URI, or null if the URI cannot be rewritten
    • getQueryParam

      @Nullable public static String getQueryParam(javax.ws.rs.core.UriInfo uriInfo, String name, String compatiblityName)
      Returns the value of the query parameter of the given name. If not found, but there is a value corresponding to the parameter of the given compatiblityName it is returned instead and a warning is logged suggestion to make queries using the new parameter name. This method is useful for renaming query parameters (from name to compatiblityName) while preserving backward compatibility of the REST API.