KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * $Id: ControllerSingleton.java,v 1.2 2004/06/27 17:41:31 eelco12 Exp $
3  * $Source: /cvsroot/mav/maverick/src/java/org/infohazard/maverick/flow/ControllerSingleton.java,v $
4  */

5
6 package org.infohazard.maverick.flow;
7
8 import org.jdom.Element;
9
10 /**
11  * ControllerSingleton serves two purposes: First, the presence of this
12  * interface on a Controller class indicates to the framework that the
13  * controller should be defined as a singleton rather than instantiating
14  * a fresh instance for every request. Second, it provides a method
15  * to initialize the singleton controller with the relevant XML data
16  * from the configuration file.
17  */

18 public interface ControllerSingleton extends Controller
19 {
20     /**
21      * Guaranteed to be called once with the XML configuration of
22      * the controller from the master config file.
23      * @param controllerNode the xml node of this controller.
24      */

25     public void init(Element controllerNode) throws ConfigException;
26 }
Popular Tags