KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > csdl > stackmvc > control > command > Command


1 package csdl.stackmvc.control.command;
2
3 import csdl.stackmvc.control.Page;
4 import javax.servlet.http.HttpServletRequest JavaDoc;
5
6 /**
7  * An interface to support the Command pattern for action dispatching in the
8  * MVC framework for hackystat JSP page serving. All command instances should
9  * 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 JavaDoc request);
25 }
26
27
Popular Tags