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 PathMatcherAn interface defines matching methods for HTTP path.- Since:
- 1.1
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static PathMatcherfrom(PathPattern pathPattern)Returns a newPathMatcherfrom specifiedPathPattern.static PathMatcherfromPattern(java.lang.String pathPattern)Returns a newPathMatcherfrom specified path patterndefault booleanmatches(HttpRequestContext ctx)Check if the path of the specifiedHttpRequestContextmatches this matcher or not.PathPatternpathPattern()Returns the path pattern.
-
-
-
Method Detail
-
fromPattern
static PathMatcher fromPattern(java.lang.String pathPattern)
Returns a newPathMatcherfrom specified path pattern- Parameters:
pathPattern- the path pattern string- Returns:
- a
PathMatcher
-
from
static PathMatcher from(PathPattern pathPattern)
Returns a newPathMatcherfrom specifiedPathPattern.- Parameters:
pathPattern- the path pattern- Returns:
- a
PathMatcher
-
matches
default boolean matches(HttpRequestContext ctx)
Check if the path of the specifiedHttpRequestContextmatches this matcher or not.- Parameters:
ctx- the context of the HTTP request- Returns:
trueif the path of the specifiedHttpRequestContextmatches this matcher,falseotherwise
-
pathPattern
PathPattern pathPattern()
Returns the path pattern.- Returns:
- a
PathPattern
-
-