Interface Controller
- All Known Implementing Classes:
HttpMethodController,HttpParamVariableController,HttpPathController,HttpPathVariableController,InternalFileResourceController,JsonParserController,MethodController,ModuloController,RegexHttpMethodController,RegexHttpPathController
public interface Controller
Defines the methods that a controller must implement.
A Controller is a class that handles a http request and returns a response.
if the response is null then the request is forwarded to the next controller.
-
Method Summary
Modifier and TypeMethodDescriptionapply(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Configuration configuration)Call the method that handles the request.voidsetNextStep(Controller controller)Set the next controller.
-
Method Details
-
apply
Object apply(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Configuration configuration) throws ExceptionCall the method that handles the request.- Parameters:
request- the http request.response- the http response.configuration- the configuration.- Returns:
- the response.
- Throws:
Exception
-
setNextStep
Set the next controller.- Parameters:
controller- The next controller.
-