Interface PathMatcher

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface PathMatcher
    An interface defines matching methods for HTTP path.
    Since:
    1.1
    • Method Detail

      • fromPattern

        static PathMatcher fromPattern​(java.lang.String pathPattern)
        Returns a new PathMatcher from specified path pattern
        Parameters:
        pathPattern - the path pattern string
        Returns:
        a PathMatcher
      • matches

        default boolean matches​(HttpRequestContext ctx)
        Check if the path of the specified HttpRequestContext matches this matcher or not.
        Parameters:
        ctx - the context of the HTTP request
        Returns:
        true if the path of the specified HttpRequestContextmatches this matcher, false otherwise
      • pathPattern

        PathPattern pathPattern()
        Returns the path pattern.
        Returns:
        a PathPattern