Package org.apache.druid.server
Class JettyUtils
- java.lang.Object
-
- org.apache.druid.server.JettyUtils
-
public class JettyUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description JettyUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringconcatenateForRewrite(String base, String encodedPath, String encodedQueryString)Concatenate URI parts, in a way that is useful for proxy servlets.static StringgetQueryParam(javax.ws.rs.core.UriInfo uriInfo, String name, String compatiblityName)Returns the value of the query parameter of the given name.
-
-
-
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 getRequestURIencodedQueryString- 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.
-
-