Class MethodController
java.lang.Object
com.chillycheesy.modulo.controllers.MethodController
- All Implemented Interfaces:
Controller
Controller that apply that invoke the method of an instance.
-
Constructor Summary
ConstructorsConstructorDescriptionMethodController(Object instance, Method method)Constructor.MethodController(Object instance, Method method, List<MethodControllerParameterAnnotationApplier> appliers)Constructor -
Method Summary
Modifier and TypeMethodDescriptionapply(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Configuration configuration)Invoke the method and return the next controller.voidsetNextStep(Controller controller)Sets the next controller
-
Constructor Details
-
MethodController
public MethodController(Object instance, Method method, List<MethodControllerParameterAnnotationApplier> appliers)Constructor- Parameters:
instance- The instance of the class that contains the methodmethod- The method to invokeappliers- The list of appliers to apply to the method parameters.
-
MethodController
Constructor. define the defaultMethodControllerParameterAnnotationApplierto apply to the method parameters. it includes:- Parameters:
instance- The instance of the class that contains the methodmethod- The method to invoke
-
-
Method Details
-
apply
public Object apply(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Configuration configuration) throws ExceptionInvoke the method and return the next controller.- Specified by:
applyin interfaceController- Parameters:
request- the http request.response- the http response.configuration- the configuration.- Returns:
- the next controller.
- Throws:
Exception- if an error occurs.
-
setNextStep
Sets the next controller- Specified by:
setNextStepin interfaceController- Parameters:
controller- The next controller.
-