Class JettyUtils


  • public class JettyUtils
    extends Object
    • Constructor Detail

      • JettyUtils

        public JettyUtils()
    • Method Detail

      • concatenateForRewrite

        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
        encodedQueryString - encoded query string, like you would get from HttpServletRequest's getQueryString
      • 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.