Package org.apache.camel.http.common
Interface ServletResolveConsumerStrategy
-
- All Known Implementing Classes:
HttpRestServletResolveConsumerStrategy,HttpServletResolveConsumerStrategy
public interface ServletResolveConsumerStrategyStrategy to resolve which consumer to service an incomingHttpServletRequest.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisHttpMethodAllowed(javax.servlet.http.HttpServletRequest request, String method, Map<String,HttpConsumer> consumers)Checks if the http request method (GET, POST, etc) would be allow among the registered consumers.HttpConsumerresolve(javax.servlet.http.HttpServletRequest request, Map<String,HttpConsumer> consumers)Resolve the consumer to use.
-
-
-
Method Detail
-
resolve
HttpConsumer resolve(javax.servlet.http.HttpServletRequest request, Map<String,HttpConsumer> consumers)
Resolve the consumer to use.- Parameters:
request- the http requestconsumers- the map of registered consumers- Returns:
- the consumer to service the request, or null if no match, which sends back a
HttpServletResponse.SC_NOT_FOUNDto the client.
-
isHttpMethodAllowed
boolean isHttpMethodAllowed(javax.servlet.http.HttpServletRequest request, String method, Map<String,HttpConsumer> consumers)Checks if the http request method (GET, POST, etc) would be allow among the registered consumers.- Parameters:
request- the http requestmethod- the http methodconsumers- the map of registered consumers- Returns:
- true if the method is allowed and can be serviced. Otherwise a
HttpServletResponse.SC_METHOD_NOT_ALLOWEDis returned to the client.
-
-