01: package csdl.stackmvc.control.command;
02:
03: import csdl.stackmvc.control.Page;
04: import javax.servlet.http.HttpServletRequest;
05:
06: /**
07: * An interface to support the Command pattern for action dispatching in the
08: * MVC framework for hackystat JSP page serving. All command instances should
09: * take a request and response object, extract any additional parameters necessary,
10: * do processing and store the results in the request object, then return the Page
11: * instance that should be dispatched to for displaying the results.
12: *
13: * @author Philip M. Johnson
14: * @author Jitender Miglani (did minor changes)
15: */
16: public interface Command {
17: /**
18: * Processes a request from the user.
19: *
20: * @param request The request object, from which additional data concerning the user request
21: * can be extracted.
22: * @return The page that should be dispatched to next.
23: */
24: Page process(HttpServletRequest request);
25: }
|