KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > turbine > services > avaloncomponent > AvalonComponentService


1 package org.apache.turbine.services.avaloncomponent;
2
3 /*
4  * Copyright 2001-2004 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License")
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 import org.apache.avalon.framework.component.Component;
20 import org.apache.avalon.framework.component.ComponentException;
21
22 import org.apache.turbine.services.Service;
23
24 /**
25  * This service allows access to avalon components.
26  *
27  * @author <a HREF="mailto:quintonm@bellsouth.net">Quinton McCombs</a>
28  * @author <a HREF="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
29  * @version $Id: AvalonComponentService.java,v 1.9.2.2 2004/05/20 03:05:18 seade Exp $
30  */

31 public interface AvalonComponentService
32         extends Service
33 {
34     /** The publically visible name of the service */
35     String JavaDoc SERVICE_NAME = "AvalonComponentService";
36
37     /** Where we write the Avalon Logger messages */
38     String JavaDoc AVALON_LOG_CATEGORY = "avalon";
39
40     /** property specifing file name of the component config file */
41     String JavaDoc COMPONENT_CONFIG_KEY = "componentConfiguration";
42
43     /** property specifing file name of the component config file */
44     String JavaDoc COMPONENT_CONFIG_VALUE = "/WEB-INF/conf/componentConfiguration.xml";
45
46     /** property specifing file name of the component role file */
47     String JavaDoc COMPONENT_ROLE_KEY = "componentRoles";
48
49     /** property specifing file name of the component role file */
50     String JavaDoc COMPONENT_ROLE_VALUE = "/WEB-INF/conf/roleConfiguration.xml";
51
52     /** property for the Components to look up */
53     String JavaDoc COMPONENT_LOOKUP_KEY = "lookup";
54
55     /** Key used in the context for defining the application root */
56     String JavaDoc COMPONENT_APP_ROOT = "componentAppRoot";
57
58     /**
59      * Returns an instance of the named component
60      *
61      * @param roleName Name of the role the component fills.
62      * @return an instance of the named component
63      * @throws ComponentException generic exception
64      */

65     Component lookup(String JavaDoc roleName)
66             throws ComponentException;
67
68     /**
69      * Releases the component
70      *
71      * @param component the component to release
72      */

73     void release(Component component);
74
75 }
76
Popular Tags