KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > test > RealLongTxnActionHandler


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.test;
8
9
10 import com.inversoft.verge.mvc.controller.actionflow.ActionFlowAction;
11
12
13 /**
14  * <p>
15  * This class is a testing action handler for long txn
16  * support.
17  * </p>
18  *
19  * @author Brian Pontarelli
20  */

21 public class RealLongTxnActionHandler {
22
23     public String JavaDoc handleStart(ActionFlowAction action) {
24         return "action1";
25     }
26
27     public String JavaDoc handleAction1(ActionFlowAction action) throws InterruptedException JavaDoc {
28         Thread.sleep(5000);
29         System.out.println("Finished with action1 after 5 seconds");
30         return "action2";
31     }
32
33     public String JavaDoc handleAction2(ActionFlowAction action) throws InterruptedException JavaDoc {
34         Thread.sleep(5000);
35         System.out.println("Finished with action2 after 5 seconds");
36         return "action3";
37     }
38
39     public String JavaDoc handleAction3(ActionFlowAction action) {
40         System.out.println("Finished with action3. No delay");
41         return "action4";
42     }
43
44     public String JavaDoc handleAction4(ActionFlowAction action) {
45         System.out.println("Finished with action4. No delay");
46         return "action5";
47     }
48
49     public String JavaDoc handleAction5(ActionFlowAction action) throws InterruptedException JavaDoc {
50         Thread.sleep(5000);
51         System.out.println("Finished with action5 after 5 seconds");
52         return "action6";
53     }
54
55     public String JavaDoc handleAction6(ActionFlowAction action) throws InterruptedException JavaDoc {
56         Thread.sleep(5000);
57         System.out.println("Finished with action6 after 5 seconds");
58         return "action7";
59     }
60 }
Popular Tags