KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * $Id: ShuntFactory.java,v 1.3 2002/02/07 22:49:56 lhoriman Exp $
3  * $Source: /cvsroot/mav/maverick/src/java/org/infohazard/maverick/flow/ShuntFactory.java,v $
4  */

5 package org.infohazard.maverick.flow;
6
7 import javax.servlet.ServletConfig JavaDoc;
8 import org.jdom.Element;
9
10 /**
11  * Pluggable modules which build Shunts must implement this interface and then
12  * be defined in the <modules> section of the Maverick config file. One
13  * factory is created to build all Shunts.
14  *
15  * @author Jeff Schnitzer
16  * @version $Revision: 1.3 $ $Date: 2002/02/07 22:49:56 $
17  */

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

30     public void init(Element factoryNode, ServletConfig JavaDoc servletCfg) throws ConfigException;
31
32     /**
33      * Creates an empty Shunt which will be populated.
34      *
35      * @return A new, empty shunt.
36      * @exception ConfigException If something is wrong with the configuration.
37      */

38     public Shunt createShunt() throws ConfigException;
39 }
40
41
Popular Tags