Class RegexHttpMethodController
java.lang.Object
com.chillycheesy.modulo.controllers.RegexHttpMethodController
- All Implemented Interfaces:
Controller
Controller that check if the http methods match with the target regex.
Check if the method match with the target regex then return next step result.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Configuration configuration)Apply the controller.voidsetNextStep(Controller controller)Define the next controller.
-
Constructor Details
-
RegexHttpMethodController
Constructor.- Parameters:
regex- the target regex.
-
-
Method Details
-
apply
public Object apply(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Configuration configuration) throws ExceptionApply the controller. If the method match with the target regex then return next step result.- Specified by:
applyin interfaceController- Parameters:
request- the http request.response- the http response.configuration- the configuration.- Returns:
- the response.
- Throws:
Exception
-
setNextStep
Define the next controller.- Specified by:
setNextStepin interfaceController- Parameters:
controller- The next controller.
-