Package org.atmosphere.util
Class PathTemplate
java.lang.Object
org.atmosphere.util.PathTemplate
A lightweight URI path template that supports
{varName} and
{varName:regex} syntax. Replaces the Jersey-derived
UriTemplate / UriPattern / UriTemplateParser / UriComponent classes.
Example usage:
var t = new PathTemplate("/chat/{room}");
var vars = new HashMap<String, String>();
if (t.match("/chat/general", vars)) {
// vars == {"room" -> "general"}
}
-
Constructor Summary
ConstructorsConstructorDescriptionPathTemplate(String template) Parse a URI template string into a compiled pattern. -
Method Summary
-
Constructor Details
-
PathTemplate
Parse a URI template string into a compiled pattern.- Parameters:
template- the template (e.g./chat/{room})- Throws:
IllegalArgumentException- if template is null, empty, or has invalid syntax
-
-
Method Details