KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > controller > actionflow > NodeExecutor


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.actionflow;
8
9
10 import java.util.Map JavaDoc;
11
12 import com.inversoft.verge.mvc.controller.actionflow.config.Namespace;
13 import com.inversoft.verge.mvc.controller.actionflow.config.Node;
14
15
16 /**
17  * This interface is used by the ActionFlowExecuter to execute
18  * a node within an ActionFlow. All nodes in an ActionFlow must
19  * have an associated NodeExecuter. Usually, nodes of a specific
20  * type have the same NodeExecuter.
21  * <p>
22  * NodeExecuters are registered with the NodeExecuterRegistry
23  * class. They are then used by the ActionFlowExecuter.
24  *
25  * @author Brian Pontarelli
26  * @since 2.0
27  * @version 2.0
28  */

29 public interface NodeExecutor {
30
31     /**
32      * Excutes the node using the Namespace object, Node object,
33      * the ActionFlowAction object and the Map of any additional parameters that
34      * might be needed. This method is not responsible for locating the next
35      * Node in the ActionFlow and calling it. This is done by the ActionFlowExecuter.
36      *
37      * @param namespace The Namespace the Node is located in
38      * @param config The Node of the Node to execute
39      * @param state The current state of the ActionFlow itself. This is where
40      * the HTTP Objects are stored.
41      * @param extraParams A Map of extra params that have been passed into the
42      * ActionFlow system.
43      * @return An Object containing the resulting action of execution. That
44      * is to say, if executing the Node caused another action to be
45      * generated, it is returned. Usually, this is simply a String
46      * However, if it is any other class, th toString() method is used
47      * to determine the action to take.
48      * @throws Exception If execution of the Node threw any Exception.
49      */

50     Object JavaDoc execute(Namespace namespace, Node config, ActionFlowAction state, Map JavaDoc extraParams)
51     throws Exception JavaDoc;
52 }
53
Popular Tags