Interface ContextPathMatcher
-
- All Known Implementing Classes:
DefaultContextPathMatcher
,RestContextPathMatcher
public interface ContextPathMatcher
A matcher used for selecting the correctHttpServerChannelHandler
to handle an incomingHttpRequest
when 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 boolean
matches(String path)
Whether the target context-path matches a regular url.boolean
matchesRest(String path, boolean wildcard)
Whether the target context-path matches a REST url.boolean
matchMethod(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.
-
-