KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sape > carbon > core > component > startup > StartupServiceConfiguration


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.component.startup;
19
20 import org.sape.carbon.core.component.ComponentConfiguration;
21 import org.sape.carbon.core.config.Configuration;
22
23 /**
24  * <p>Configuration interface for the Startup Service.</p>
25  *
26  * Copyright 2002 Sapient
27  * @since carbon 1.0
28  * @author Douglas Voet, January 2002
29  * @version $Revision: 1.15 $($Author: dvoet $ / $Date: 2003/05/05 21:21:14 $)
30  */

31 public interface StartupServiceConfiguration extends ComponentConfiguration {
32
33     /**
34      * <p>Gets the set of components that need to be started.</p>
35      *
36      * @return the set of components to be started
37      */

38     StartupComponentConfiguration[] getStartupComponent();
39
40     /**
41      * Sets the list of components to be started.
42      *
43      * @param startupComponents components to started
44      */

45     void setStartupComponent(StartupComponentConfiguration[] startupComponents);
46
47     /**
48      * Gets a component from the list of startup components.
49      *
50      * @param index index of component to get
51      * @return the component at the given index
52      */

53     StartupComponentConfiguration getStartupComponent(int index);
54
55     /**
56      * Replaces a component in the list of startup components.
57      *
58      * @param index index of component to replace
59      * @param startupComponents component to replace in the list
60      */

61     void setStartupComponent(
62         int index, StartupComponentConfiguration startupComponents);
63
64     /**
65      * Adds a component to the list of startup components.
66      *
67      * @param newStartupService component to add to the list
68      */

69     void addStartupComponent(StartupComponentConfiguration newStartupService);
70
71     /**
72      * Interface defining a component to be processed by the
73      * startup service.
74      */

75     interface StartupComponentConfiguration extends Configuration {
76         /**
77          * Gets the location of the component to start.
78          *
79          * @return location of component to start
80          */

81         String JavaDoc getComponentName();
82
83         /**
84          * Sets the location of the component to start.
85          *
86          * @param value location of component to start
87          */

88         void setComponentName(String JavaDoc value);
89
90         /**
91          * Indicates if this component is enabled to be started by the service.
92          *
93          * @return if this component should be started
94          */

95         boolean isEnabled();
96
97         /**
98          * Sets if this component is enabled to be started by the service.
99          *
100          * @param value if this component should be started
101          */

102         void setEnabled(boolean value);
103     }
104 }
105
Popular Tags