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 Type
    Method
    Description
    apply​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Configuration configuration)
    Call the method that handles the request.
    void
    setNextStep​(Controller controller)
    Set the next controller.
  • Method Details

    • apply

      Object apply(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Configuration configuration) throws Exception
      Call the method that handles the request.
      Parameters:
      request - the http request.
      response - the http response.
      configuration - the configuration.
      Returns:
      the response.
      Throws:
      Exception
    • setNextStep

      void setNextStep(Controller controller)
      Set the next controller.
      Parameters:
      controller - The next controller.