Interface that parameterizes the MultiActionController class using the Strategy GoF Design pattern, allowing the mapping from incoming request to handler method name to be varied without affecting other application code.
Abstract base class for URL-based
Simple implementation of
The most flexible out-of-the-box implementation of the
Exception thrown when there is no handler method ("action" method) for a specific HTTP request.
Typically a controller that handles multiple request types will extend MultiActionController, and implement multiple request handling methods that will be invoked by reflection if they follow this class' naming convention. Classes are analyzed at startup and methods cached, so the performance overhead of reflection in this approach is negligible.
This approach is analogous to the Struts 1.1 DispatcherAction class, but more sophisticated, as it supports configurable mapping from requests to URLs and allows for delegation as well as subclassing.
This package is discussed in Chapter 12 of Expert One-On-One J2EE Design and Development by Rod Johnson, and used in the sample application.