Interface ContextPathMatcher
-
- All Known Implementing Classes:
DefaultContextPathMatcher,RestContextPathMatcher
public interface ContextPathMatcherA matcher used for selecting the correctHttpServerChannelHandlerto handle an incomingHttpRequestwhen you use multiple routes on the same port. As when we do that, we need to multiplex and select the correct consumer route to process the HTTP request. To do that we need to match on the incoming HTTP request context-path from the request.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanmatches(String path)Whether the target context-path matches a regular url.booleanmatchesRest(String path, boolean wildcard)Whether the target context-path matches a REST url.booleanmatchMethod(String method, String restrict)Matches the given request HTTP method with the configured HTTP method of the consumer
-
-
-
Method Detail
-
matches
boolean matches(String path)
Whether the target context-path matches a regular url.- Parameters:
path- the context-path from the incoming HTTP request- Returns:
- true to match, false if not.
-
matchesRest
boolean matchesRest(String path, boolean wildcard)
Whether the target context-path matches a REST url.- Parameters:
path- the context-path from the incoming HTTP requestwildcard- whether to match strict or by wildcards- Returns:
- true to match, false if not.
-
-