Class RegexHttpPathController

java.lang.Object
com.chillycheesy.modulo.controllers.RegexHttpPathController
All Implemented Interfaces:
Controller

public class RegexHttpPathController extends Object implements 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 Details

    • RegexHttpPathController

      public RegexHttpPathController(String regex)
      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 Exception
      Apply the controller. If the path match with the regex then return the next controller result.
      Specified by:
      apply in interface Controller
      Parameters:
      request - the http request.
      response - the http response.
      configuration - the configuration.
      Returns:
      the response.
      Throws:
      Exception
    • setNextStep

      public void setNextStep(Controller controller)
      Define the next controller.
      Specified by:
      setNextStep in interface Controller
      Parameters:
      controller - The next controller.