Class RegexHttpMethodController

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

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

    • RegexHttpMethodController

      public RegexHttpMethodController(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 method match with the target regex then return next step 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.