Class RestConsumerContextPathMatcher

    • Method Detail

      • matchPath

        public static boolean matchPath​(String requestPath,
                                        String consumerPath,
                                        boolean matchOnUriPrefix)
        Does the incoming request match the given consumer path (ignore case)
        Parameters:
        requestPath - the incoming request context path
        consumerPath - a consumer path
        matchOnUriPrefix - whether to use the matchOnPrefix option
        Returns:
        true if matched, false otherwise
      • matchBestPath

        public static RestConsumerContextPathMatcher.ConsumerPath matchBestPath​(String requestMethod,
                                                                                String requestPath,
                                                                                List<RestConsumerContextPathMatcher.ConsumerPath> consumerPaths)
        Finds the best matching of the list of consumer paths that should service the incoming request.
        Parameters:
        requestMethod - the incoming request HTTP method
        requestPath - the incoming request context path
        consumerPaths - the list of consumer context path details
        Returns:
        the best matched consumer, or null if none could be determined.