Class RestContextPathMatcher
- java.lang.Object
-
- org.apache.camel.component.netty.http.DefaultContextPathMatcher
-
- org.apache.camel.component.netty.http.RestContextPathMatcher
-
- All Implemented Interfaces:
ContextPathMatcher
public class RestContextPathMatcher extends DefaultContextPathMatcher
AContextPathMatcher
that supports the Rest DSL.
-
-
Field Summary
-
Fields inherited from class org.apache.camel.component.netty.http.DefaultContextPathMatcher
matchOnUriPrefix, path
-
-
Constructor Summary
Constructors Constructor Description RestContextPathMatcher(String rawPath, String path, String restrictMethod, boolean matchOnUriPrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
int
hashCode()
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 consumerboolean
matchRestPath(String requestPath, String consumerPath, boolean wildcard)
Matches the given request path with the configured consumer path-
Methods inherited from class org.apache.camel.component.netty.http.DefaultContextPathMatcher
getPath, matches
-
-
-
-
Method Detail
-
matchesRest
public boolean matchesRest(String path, boolean wildcard)
Description copied from interface:ContextPathMatcher
Whether the target context-path matches a REST url.- Specified by:
matchesRest
in interfaceContextPathMatcher
- Overrides:
matchesRest
in classDefaultContextPathMatcher
- Parameters:
path
- the context-path from the incoming HTTP requestwildcard
- whether to match strict or by wildcards- Returns:
- true to match, false if not.
-
matchMethod
public boolean matchMethod(String method, String restrict)
Description copied from interface:ContextPathMatcher
Matches the given request HTTP method with the configured HTTP method of the consumer- Specified by:
matchMethod
in interfaceContextPathMatcher
- Overrides:
matchMethod
in classDefaultContextPathMatcher
- Parameters:
method
- the request HTTP methodrestrict
- the consumer configured HTTP restrict method- Returns:
- true if matched, false otherwise
-
matchRestPath
public boolean matchRestPath(String requestPath, String consumerPath, boolean wildcard)
Matches the given request path with the configured consumer path- Parameters:
requestPath
- the request pathconsumerPath
- the consumer path which may use { } tokens- Returns:
- true if matched, false otherwise
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classDefaultContextPathMatcher
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classDefaultContextPathMatcher
-
-