Package io.undertow.util
Class PathTemplate
java.lang.Object
io.undertow.util.PathTemplate
- All Implemented Interfaces:
Comparable<PathTemplate>
Represents a parsed web socket path template.
This class can be compared to other path templates, with templates that are considered lower have a higher priority, and should be checked first.
This comparison can also be used to check for semantically equal paths, if a.compareTo(b) == 0 then the two paths are equivalent, which will generally result in a deployment exception.
- Author:
- Stuart Douglas
-
Method Summary
Modifier and TypeMethodDescriptionint
static PathTemplate
boolean
getBase()
int
hashCode()
boolean
Check if the given uri matches the template.toString()
-
Method Details
-
create
-
matches
Check if the given uri matches the template. If so then it will return true and place the value of any path parameters into the given map.Note the map may be modified even if the match in unsuccessful, however in this case it will be emptied before the method returns
- Parameters:
path
- The request path, relative to the context rootpathParameters
- The path parameters map to fill out- Returns:
- true if the URI is a match
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<PathTemplate>
-
getBase
-
getTemplateString
-
getParameterNames
-
toString
-