KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > fulcrum > yaafi > framework > container > ServiceComponent


1 package org.apache.fulcrum.yaafi.framework.container;
2
3 import org.apache.avalon.framework.activity.Disposable;
4 import org.apache.avalon.framework.activity.Executable;
5 import org.apache.avalon.framework.activity.Initializable;
6 import org.apache.avalon.framework.activity.Startable;
7 import org.apache.avalon.framework.activity.Suspendable;
8 import org.apache.avalon.framework.configuration.Configurable;
9 import org.apache.avalon.framework.configuration.Reconfigurable;
10 import org.apache.avalon.framework.context.Contextualizable;
11 import org.apache.avalon.framework.logger.LogEnabled;
12 import org.apache.avalon.framework.parameters.Parameterizable;
13 import org.apache.avalon.framework.service.Serviceable;
14
15 /*
16  * Copyright 2004 Apache Software Foundation
17  * Licensed under the Apache License, Version 2.0 (the "License");
18  * you may not use this file except in compliance with the License.
19  * You may obtain a copy of the License at
20  *
21  * http://www.apache.org/licenses/LICENSE-2.0
22  *
23  * Unless required by applicable law or agreed to in writing, software
24  * distributed under the License is distributed on an "AS IS" BASIS,
25  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
26  * implied.
27  *
28  * See the License for the specific language governing permissions and
29  * limitations under the License.
30  */

31
32 /**
33  * This service allows access to avalon components.
34  */

35
36 public interface ServiceComponent
37     extends Configurable, Initializable, Startable, Suspendable, Reconfigurable, Disposable, Serviceable, Contextualizable, Parameterizable, LogEnabled, Executable
38 {
39     /**
40      * Create an instance of the service class
41      *
42      * @throws ClassNotFoundException
43      */

44     public Class JavaDoc loadClass() throws ClassNotFoundException JavaDoc;
45     
46     /**
47      * Create an instance of the service class
48      *
49      * @throws InstantiationException
50      * @throws IllegalAccessException
51      */

52     public Object JavaDoc create() throws InstantiationException JavaDoc, IllegalAccessException JavaDoc;
53     
54     /**
55      * @return Returns the if the service instance was already instantiated.
56      */

57     public boolean isInstantiated();
58
59     /**
60      * @return Return true if the service is created on startup
61      */

62     public boolean isEarlyInit();
63     
64     /**
65      * @return Returns the instance
66      */

67     public Object JavaDoc getInstance() throws InstantiationException JavaDoc, IllegalAccessException JavaDoc;
68     
69     /**
70      * @return Returns the name.
71      */

72     public String JavaDoc getName();
73     
74     /**
75      * @return Returns the shorthand.
76      */

77     public String JavaDoc getShorthand();
78
79 }
Popular Tags