KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > MVCMediator


1 /*
2  * Copyright (c) 2003, Inversoft
3  *
4  * This software is distribuable under the GNU Lesser General Public License.
5  * For more information visit gnu.org.
6  */

7 package com.inversoft.verge.mvc;
8
9
10 import javax.servlet.http.HttpServletRequest JavaDoc;
11 import javax.servlet.http.HttpServletResponse JavaDoc;
12
13
14 /**
15  * <p>
16  * This interface defines how the MVC system of the Inversoft
17  * Portal framework is controlled. This component is more
18  * conceptually above the Controller component of the MVC.
19  * This component determines the order and way in which the
20  * MVC components are called.
21  * </p>
22  *
23  * <p>
24  * An example is that an MVC may wish the setup the Model
25  * first using a separate classes to parse the
26  * HttpServletRequest parameters to determine how to set the
27  * model values. Another MVC may wish to have the Model
28  * setup by the application writer, in which case the
29  * MVCMediator implementation would not handle the Model
30  * information in the HttpServletRequest.
31  * </p>
32  *
33  * @author Brian Pontarelli
34  * @since 2.0
35  * @version 2.0
36  */

37 public interface MVCMediator {
38
39     /**
40      * Handles the mediation of the entire MVC system. Implementation classes
41      * can handle this however they see fit. There are NO requirements on
42      * what functionilty they must contain.
43      *
44      * @param request The HttpServletRequest from which the clients request
45      * information may be retrieved
46      * @param response The HttpServletResponse which can be used to redirect
47      * or forward the the client to another view
48      * @throws com.inversoft.verge.mvc.MVCException If there were any problems during MVC execution
49      */

50     void mediate(HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response)
51     throws MVCException;
52 }
53
Popular Tags