public class DefaultContextPathMatcher extends Object implements ContextPathMatcher
ContextPathMatcher which supports the matchOnUriPrefix option.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
matchOnUriPrefix |
protected String |
path |
| Constructor and Description |
|---|
DefaultContextPathMatcher(String path,
boolean matchOnUriPrefix) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getPath() |
int |
hashCode() |
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
|
protected final String path
protected final boolean matchOnUriPrefix
public DefaultContextPathMatcher(String path, boolean matchOnUriPrefix)
public boolean matches(String path)
ContextPathMatchermatches in interface ContextPathMatcherpath - the context-path from the incoming HTTP requestpublic boolean matchesRest(String path, boolean wildcard)
ContextPathMatchermatchesRest in interface ContextPathMatcherpath - the context-path from the incoming HTTP requestwildcard - whether to match strict or by wildcardspublic boolean matchMethod(String method, String restrict)
ContextPathMatchermatchMethod in interface ContextPathMatchermethod - the request HTTP methodrestrict - the consumer configured HTTP restrict methodpublic String getPath()
Apache Camel