Package org.actioncontroller

Action Controller is a framework that takes "controller" classes and generates ApiControllerAction for each method annotated with a "routing mapper annotation" such as GET. Example
 public class TestController {

     @Get("/uppercase")
     @ContentBody
     public String upcase(@RequestParam("myParam") String parameter) {
         return parameter.toUpperCase();
     }
 }
 

In this example, GET is a routing mapper annotation because it is annotated HttpRouterMapping. This annotation refers to GET.ActionFactory and GET.ActionFactory.create(org.actioncontroller.actions.GET, java.lang.Object, java.lang.reflect.Method, org.actioncontroller.ApiControllerContext) is used to create an ApiControllerMethodAction.

ApiControllerMethodAction uses the RequestParam annotation on the parameter to decide how this parameter is mapped from the request. RequestParam is annotated with HttpParameterMapping, which refers to RequestParam.MapperFactory. RequestParam.MapperFactory again is used to create a HttpParameterMapper which extracts the method argument from the http request.

ApiControllerMethodAction further uses the ContentBody annotation on the method to determine how the return value is mapped the the response. ContentBody is annotated with HttpReturnMapping, which refers to ContentBody.MapperFactory. ContentBody.MapperFactory is used to create a HttpReturnMapper which converts the method return value to the http response.

A controller can be used in three contexts: