Class RegexHttpPathController
java.lang.Object
com.chillycheesy.modulo.controllers.RegexHttpPathController
- All Implemented Interfaces:
Controller
Controller that test if the http path match with the regex.
If the path match with the regex then return the next controller 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
-
RegexHttpPathController
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 path match with the regex then return the next controller 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.
-