Class RouteResult<T>
- java.lang.Object
-
- org.apache.flink.runtime.rest.handler.router.RouteResult<T>
-
public class RouteResult<T> extends Object
This is adopted and simplified code from tv.cntt:netty-router library. For more information checkRouter. Original code: https://github.com/sinetja/netty-router/blob/2.2.0/src/main/java/io/netty/handler/codec/http/router/RouteResult.javaResult of calling
Router.route(HttpMethod, String).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdecodedPath()Returns the decoded request path.Stringparam(String name)Extracts the param inpathParamsfirst, then falls back to the first matching param inqueryParams.List<String>params(String name)Extracts all params inpathParamsandqueryParamsmatching the name.Map<String,String>pathParams()Returns all params embedded in the request path.StringqueryParam(String name)Extracts the first matching param inqueryParams.Map<String,List<String>>queryParams()Returns all params in the query part of the request URI.Ttarget()Stringuri()Returns the original request URI.
-
-
-
Method Detail
-
uri
public String uri()
Returns the original request URI.
-
decodedPath
public String decodedPath()
Returns the decoded request path.
-
queryParams
public Map<String,List<String>> queryParams()
Returns all params in the query part of the request URI.
-
target
public T target()
-
queryParam
public String queryParam(String name)
Extracts the first matching param inqueryParams.- Returns:
nullif there's no match
-
param
public String param(String name)
Extracts the param inpathParamsfirst, then falls back to the first matching param inqueryParams.- Returns:
nullif there's no match
-
-