KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > controller > LongTxnHandler


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.controller;
8
9
10 import javax.servlet.http.HttpServletRequest JavaDoc;
11 import javax.servlet.http.HttpServletResponse JavaDoc;
12
13 import com.inversoft.verge.mvc.MVCException;
14
15
16 /**
17  * <p>
18  * This interface is a handler for handling long transaction
19  * start and stop events. These events are generated out of
20  * the controller systems that support long transaction
21  * handling. The controller system must provide a method of
22  * registering and unregistering handlers.
23  * </p>
24  *
25  * @author Brian Pontarelli
26  */

27 public interface LongTxnHandler {
28
29     /**
30      * Handles the start of a long transaction usually by dynamically including
31      * the given URL using the request and response.
32      *
33      * @param request The HttpServletRequest if needed
34      * @param response The HttpServletResponse if needed
35      * @param url The URL to include if needed
36      * @throws com.inversoft.verge.mvc.MVCException If there was any problems starting the long
37      * transaction handling
38      */

39     void handleStartLongTxn(HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response,
40             String JavaDoc url)
41     throws MVCException;
42
43     /**
44      * Handles the end of a long transaction usually by dynamically including
45      * the given URL using the request and response. This could also manually
46      * write out a meta-refresh tag if the URL is empty.
47      *
48      * @param request The HttpServletRequest if needed
49      * @param response The HttpServletResponse if needed
50      * @param url The URL to include if needed
51      * @param result The result from the execution of the controller
52      * @throws com.inversoft.verge.mvc.MVCException If there was any problems starting the long
53      * transaction handling
54      */

55     void handleEndLongTxn(HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response,
56             String JavaDoc url, Result result)
57     throws MVCException;
58 }
Popular Tags