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 check Router. Original code: https://github.com/sinetja/netty-router/blob/2.2.0/src/main/java/io/netty/handler/codec/http/router/RouteResult.java

Result of calling Router.route(HttpMethod, String).

  • Constructor Details

  • Method Details

    • uri

      public String uri()
      Returns the original request URI.
    • decodedPath

      public String decodedPath()
      Returns the decoded request path.
    • pathParams

      public Map<String,String> pathParams()
      Returns all params embedded in the 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 in queryParams.
      Returns:
      null if there's no match
    • param

      public String param(String name)
      Extracts the param in pathParams first, then falls back to the first matching param in queryParams.
      Returns:
      null if there's no match
    • params

      public List<String> params(String name)
      Extracts all params in pathParams and queryParams matching the name.
      Returns:
      Unmodifiable list; the list is empty if there's no match