Module io.inverno.mod.http.base
Package io.inverno.mod.http.base.router
Class HeadersRoute.HeaderMatcher
java.lang.Object
io.inverno.mod.http.base.router.HeadersRoute.HeaderMatcher
- Enclosing interface:
HeadersRoute<A>
A header matcher used to match a header against a list of static values or or a list of patterns.
A header is matched if any of the static values or patterns defined in the matcher are matching the value.
- Since:
- 1.12
- Author:
- Jeremy Kuhn
-
Constructor Summary
ConstructorDescriptionHeaderMatcher
(Set<String> staticValues, Set<Pattern> patternValues) Creates a header matcher. -
Method Summary
-
Constructor Details
-
HeaderMatcher
Creates a header matcher.
- Parameters:
staticValues
- a list of static valuespatternValues
- a list of patterns
-
-
Method Details
-
getValues
Returns the static values matched by the matcher.
- Returns:
- a set of values
-
getPatterns
Returns the patterns matched by the matcher.
- Returns:
- a set of patterns
-
matches
Matches the specified header value.
- Parameters:
headerValue
- a header value- Returns:
- true if any of the static values or patterns is matching the header value, false otherwise
-
equals
-
hashCode
public int hashCode()
-