KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sape > carbon > core > bootstrap > Loader


1 /*
2  * The contents of this file are subject to the Sapient Public License
3  * Version 1.0 (the "License"); you may not use this file except in compliance
4  * with the License. You may obtain a copy of the License at
5  * http://carbon.sf.net/License.html.
6  *
7  * Software distributed under the License is distributed on an "AS IS" basis,
8  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
9  * the specific language governing rights and limitations under the License.
10  *
11  * The Original Code is The Carbon Component Framework.
12  *
13  * The Initial Developer of the Original Code is Sapient Corporation
14  *
15  * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
16  */

17
18 package org.sape.carbon.core.bootstrap;
19
20 import org.sape.carbon.core.component.ComponentKeeper;
21 import org.sape.carbon.core.config.ConfigurationService;
22
23 /**
24  * <p>This interface defines the contract objects must adhere to in order to
25  * load (bootstrap) the system. The methods will be called in the following
26  * order by <code>BootStrapper</code>:
27  * <ol>
28  * <li><code>fetchConfigurationService</code></li>
29  * <li><code>fetchComponentKeeper</code></li>
30  * </ol>
31  * </p>
32  *
33  * Copyright 2002 Sapient
34  * @since carbon 1.0
35  * @author Douglas Voet, January 2002
36  * @version $Revision: 1.11 $($Author: dvoet $ / $Date: 2003/05/05 21:21:11 $)
37
38  */

39 public interface Loader {
40     /**
41      * <p>
42      * Loads the root <code>ConfigurationService</code> for the system
43      * and returns it. This method cannot rely on any other part of the
44      * system to construct the <code>ConfigurationService</code>.
45      * </p>
46      *
47      * @return a reference to the <code>ConfigurationService</code>
48      * service for the system
49      *
50      * @throws BootStrapException if the ConfigurationService could
51      * not be loaded for any reason
52      */

53     ConfigurationService fetchConfigurationService();
54
55     /**
56      * <p>
57      * Loads the <code>ComponentKeeper</code> for the system and returns it.
58      * This method must use configuration supplied by the
59      * <code>configurationService</code> parameter
60      * </p>
61      *
62      * @param configurationService the value returned by
63      * <code>fetchConfigurationService</code>
64      * @return the <code>ComponentKeeper</code> for the system
65      *
66      * @throws BootStrapException if the ComponentKeeper could
67      * not be loaded for any reason
68      */

69     ComponentKeeper fetchComponentKeeper(ConfigurationService
70             configurationService);
71
72     /** @link dependency */
73     /*#ComponentKeeper lnkComponentKeeper;*/
74
75     /** @link dependency */
76     /*#ConfigurationService lnkConfigurationService;*/
77 }
78
Popular Tags