KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infohazard > maverick > flow > ControllerFactory


1 /*
2  * $Id: ControllerFactory.java,v 1.11 2004/06/27 17:42:14 eelco12 Exp $
3  * $Source: /cvsroot/mav/maverick/src/java/org/infohazard/maverick/flow/ControllerFactory.java,v $
4  */

5
6 package org.infohazard.maverick.flow;
7
8 import javax.servlet.ServletConfig JavaDoc;
9
10 import org.jdom.Element;
11
12 /**
13  * Interface for controller factories.
14  *
15  * @author Eelco Hillenius
16  */

17 public interface ControllerFactory
18 {
19     /**
20      * The factory is initialized with the XML element from the configuration file.
21      * Individual ControllerFactory implementations are free to interpret their XML nodes
22      * as they like.
23      *
24      * @param factoryNode The XML element (and child nodes) configured in the Maverick
25      * configuration file.
26      * @param servletCfg So that the factory can get information from the container.
27      * @exception ConfigException If the configuration was invalid.
28      */

29     public void init(Element factoryNode, ServletConfig JavaDoc servletCfg) throws ConfigException;
30
31     /**
32      * Creates a controller.
33      * @param controllerNode xml node of the controller
34      * @return Controller a controller
35      * @throws ConfigException
36      */

37     public Controller createController(Element controllerNode) throws ConfigException;
38 }
Popular Tags