KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > osgi > service > component > ComponentInstance


1 /*
2  * $Header: /cvshome/build/org.osgi.service.component/src/org/osgi/service/component/ComponentInstance.java,v 1.13 2006/06/16 16:31:26 hargrave Exp $
3  *
4  * Copyright (c) OSGi Alliance (2004, 2006). All Rights Reserved.
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 package org.osgi.service.component;
20
21 /**
22  * A ComponentInstance encapsulates a component instance of an activated
23  * component configuration. ComponentInstances are created whenever a component
24  * configuration is activated.
25  *
26  * <p>
27  * ComponentInstances are never reused. A new ComponentInstance object will be
28  * created when the component configuration is activated again.
29  *
30  * @version $Revision: 1.13 $
31  */

32 public interface ComponentInstance {
33     /**
34      * Dispose of the component configuration for this component instance. The
35      * component configuration will be deactivated. If the component
36      * configuration has already been deactivated, this method does nothing.
37      */

38     public void dispose();
39
40     /**
41      * Returns the component instance of the activated component configuration.
42      *
43      * @return The component instance or <code>null</code> if the component
44      * configuration has been deactivated.
45      */

46     public Object JavaDoc getInstance();
47 }
48
Popular Tags