KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > osgi > service > metatype > MetaTypeService


1 /*
2  * $Header: /cvshome/build/org.osgi.service.metatype/src/org/osgi/service/metatype/MetaTypeService.java,v 1.10 2006/06/16 16:31:23 hargrave Exp $
3  *
4  * Copyright (c) OSGi Alliance (2005, 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 package org.osgi.service.metatype;
19
20 import org.osgi.framework.Bundle;
21
22 /**
23  * The MetaType Service can be used to obtain meta type information for a
24  * bundle. The MetaType Service will examine the specified bundle for meta type
25  * documents to create the returned <code>MetaTypeInformation</code> object.
26  *
27  * <p>
28  * If the specified bundle does not contain any meta type documents, then a
29  * <code>MetaTypeInformation</code> object will be returned that wrappers any
30  * <code>ManagedService</code> or <code>ManagedServiceFactory</code>
31  * services registered by the specified bundle that implement
32  * <code>MetaTypeProvider</code>. Thus the MetaType Service can be used to
33  * retrieve meta type information for bundles which contain a meta type
34  * documents or which provide their own <code>MetaTypeProvider</code> objects.
35  *
36  * @version $Revision: 1.10 $
37  * @since 1.1
38  */

39 public interface MetaTypeService {
40     /**
41      * Return the MetaType information for the specified bundle.
42      *
43      * @param bundle The bundle for which meta type information is requested.
44      * @return A MetaTypeInformation object for the specified bundle.
45      */

46     public MetaTypeInformation getMetaTypeInformation(Bundle bundle);
47
48     /**
49      * Location of meta type documents. The MetaType Service will process each
50      * entry in the meta type documents directory.
51      */

52     public final static String JavaDoc METATYPE_DOCUMENTS_LOCATION = "OSGI-INF/metatype";
53 }
54
Popular Tags