Class DefaultContextPathMatcher

    • Field Detail

      • path

        protected final String path
      • matchOnUriPrefix

        protected final boolean matchOnUriPrefix
    • Constructor Detail

      • DefaultContextPathMatcher

        public DefaultContextPathMatcher​(String path,
                                         boolean matchOnUriPrefix)
    • Method Detail

      • matches

        public boolean matches​(String path)
        Description copied from interface: ContextPathMatcher
        Whether the target context-path matches a regular url.
        Specified by:
        matches in interface ContextPathMatcher
        Parameters:
        path - the context-path from the incoming HTTP request
        Returns:
        true to match, false if not.
      • matchesRest

        public boolean matchesRest​(String path,
                                   boolean wildcard)
        Description copied from interface: ContextPathMatcher
        Whether the target context-path matches a REST url.
        Specified by:
        matchesRest in interface ContextPathMatcher
        Parameters:
        path - the context-path from the incoming HTTP request
        wildcard - whether to match strict or by wildcards
        Returns:
        true to match, false if not.
      • matchMethod

        public boolean matchMethod​(String method,
                                   String restrict)
        Description copied from interface: ContextPathMatcher
        Matches the given request HTTP method with the configured HTTP method of the consumer
        Specified by:
        matchMethod in interface ContextPathMatcher
        Parameters:
        method - the request HTTP method
        restrict - the consumer configured HTTP restrict method
        Returns:
        true if matched, false otherwise
      • getPath

        public String getPath()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object