Package org.glassfish.tyrus.core.uri
Class Match
java.lang.Object
org.glassfish.tyrus.core.uri.Match
Defines a match on an endpoint. The match is either exact, or is not exact.
If the match is not exact, it means that some of the path segments on the endpoint
are variables. In this case, the Match object carries the indices of the variable
segments in the endpoint path, the map of the parameter names and values.
- Author:
- dannycoward
-
Method Summary
Modifier and TypeMethodDescriptiongetAllMatches
(String requestPath, Set<TyrusEndpointWrapper> endpoints, DebugContext debugContext) Return a list of all endpoints with path matching the request path.Get endpoint wrapper.Get map of parameter names-value pairs.static boolean
isEquivalent
(String path1, String path2) Check for equivalent paths.toString()
-
Method Details
-
getParameters
Get map of parameter names-value pairs.- Returns:
- map of parameter names-value pairs.
-
getEndpointWrapper
Get endpoint wrapper.- Returns:
- endpoint wrapper.
-
toString
-
getAllMatches
public static List<Match> getAllMatches(String requestPath, Set<TyrusEndpointWrapper> endpoints, DebugContext debugContext) Return a list of all endpoints with path matching the request path. The endpoints are in order of match preference, best match first.- Parameters:
requestPath
- request path.endpoints
- endpoints.debugContext
- debug context.- Returns:
- a list of all endpoints with path matching the request path. The endpoints are in order of match preference, best match first.
-
isEquivalent
Check for equivalent paths.- Parameters:
path1
- path to be checked.path2
- path to be checked.- Returns:
true
when provided path are equivalent,false
otherwise.
-