Class ImmutablePathMatcher.ImmutablePathMatcherBuilder<T>
java.lang.Object
io.quarkus.vertx.http.runtime.security.ImmutablePathMatcher.ImmutablePathMatcherBuilder<T>
- Enclosing class:
- ImmutablePathMatcher<T>
-
Method Summary
Modifier and TypeMethodDescriptionTwo sorts of paths are accepted: - exact path matches (without wildcard); these are matched first and Quarkus does no magic, request path must exactly match - paths with one or more wildcard: - ending wildcard matches zero or more path segment - inner wildcard matches exactly one path segment few notes: - it's key to understand only segments are matched, for example '/one*' will not match request path '/ones' - path patterns '/one*' and '/one/*' are one and the same thing as we only match path segments and '/one*' in fact means 'either /one or /one/any-number-of-path-segments' - paths are matched on longer-prefix-wins basis - what we call 'prefix' is in fact path to the first wildcard - if there is a path after first wildcard like in the '/one/*\/three' pattern ('/three' is remainder) path pattern is considered longer than the '/one/*' pattern and wins for request path '/one/two/three' - more specific pattern wins and wildcard is always less specific than any other path segment character, therefore path '/one/two/three*' will win over '/one/*\/three*' for request path '/one/two/three/four'build()
handlerAccumulator
(BiConsumer<T, T> handlerAccumulator) boolean
hasPaths()
-
Method Details
-
handlerAccumulator
public ImmutablePathMatcher.ImmutablePathMatcherBuilder<T> handlerAccumulator(BiConsumer<T, T> handlerAccumulator) - Parameters:
handlerAccumulator
- policies defined with same path are accumulated, this way, you can define more than one policy of one path (e.g. one for POST method, one for GET method)- Returns:
- ImmutablePathMatcherBuilder
-
hasPaths
public boolean hasPaths() -
rootPath
- Parameters:
rootPath
- Path to which relative patterns (paths not starting with a separator) are linked.- Returns:
- ImmutablePathMatcherBuilder
-
build
-
addPath
Two sorts of paths are accepted: - exact path matches (without wildcard); these are matched first and Quarkus does no magic, request path must exactly match - paths with one or more wildcard: - ending wildcard matches zero or more path segment - inner wildcard matches exactly one path segment few notes: - it's key to understand only segments are matched, for example '/one*' will not match request path '/ones' - path patterns '/one*' and '/one/*' are one and the same thing as we only match path segments and '/one*' in fact means 'either /one or /one/any-number-of-path-segments' - paths are matched on longer-prefix-wins basis - what we call 'prefix' is in fact path to the first wildcard - if there is a path after first wildcard like in the '/one/*\/three' pattern ('/three' is remainder) path pattern is considered longer than the '/one/*' pattern and wins for request path '/one/two/three' - more specific pattern wins and wildcard is always less specific than any other path segment character, therefore path '/one/two/three*' will win over '/one/*\/three*' for request path '/one/two/three/four'- Parameters:
path
- normalized pathhandler
- prefix path handler- Returns:
- self
-