public interface McpUriTemplateManager
This interface provides methods for extracting variables from URI templates and matching them against actual URIs.
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
extractVariableValues(String uri)
Extract URI variable values from the actual request URI.
|
List<String> |
getVariableNames()
Extract URI variable names from this URI template.
|
boolean |
isUriTemplate(String uri)
Check if the given URI is a URI template.
|
boolean |
matches(String uri)
Indicate whether the given URI matches this template.
|
List<String> getVariableNames()
IllegalArgumentException - if duplicate variable names are foundMap<String,String> extractVariableValues(String uri)
This method converts the URI template into a regex pattern, then uses that pattern to extract variable values from the request URI.
uri - The actual URI from the requestIllegalArgumentException - if the URI template is invalid or the request URI
doesn't match the template patternboolean matches(String uri)
uri - the URI to match totrue if it matches; false otherwiseboolean isUriTemplate(String uri)
Copyright © 2025. All rights reserved.