public interface McpUriTemplateManager
This interface provides methods for extracting variables from URI templates and matching them against actual URIs.
| 限定符和类型 | 方法和说明 |
|---|---|
java.util.Map<java.lang.String,java.lang.String> |
extractVariableValues(java.lang.String uri)
Extract URI variable values from the actual request URI.
|
java.util.List<java.lang.String> |
getVariableNames()
Extract URI variable names from this URI template.
|
boolean |
isUriTemplate(java.lang.String uri)
Check if the given URI is a URI template.
|
boolean |
matches(java.lang.String uri)
Indicate whether the given URI matches this template.
|
java.util.List<java.lang.String> getVariableNames()
java.lang.IllegalArgumentException - if duplicate variable names are foundjava.util.Map<java.lang.String,java.lang.String> extractVariableValues(java.lang.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 requestjava.lang.IllegalArgumentException - if the URI template is invalid or the request URI
doesn't match the template patternboolean matches(java.lang.String uri)
uri - the URI to match totrue if it matches; false otherwiseboolean isUriTemplate(java.lang.String uri)