Top Description Fields Methods
org.osgi.service.metatype

public Interface MetaTypeService

Annotations
@ProviderType
Imports
org.osgi.annotation.versioning.ProviderType, org.osgi.framework.Bundle

The MetaType Service can be used to obtain meta type information for a bundle. The MetaType Service will examine the specified bundle for meta type documents to create the returned MetaTypeInformation object.

If the specified bundle does not contain any meta type documents, then a MetaTypeInformation object will be returned that wrappers any ManagedService or ManagedServiceFactory services registered by the specified bundle that implement MetaTypeProvider. Thus the MetaType Service can be used to retrieve meta type information for bundles which contain a meta type documents or which provide their own MetaTypeProvider objects.

Author
$Id: 97ee03fd29060930164db42625cdc56392ea7f42 $
Since
1.1

Field Summary

Modifier and TypeField and Description
public static final String
METATYPE_CAPABILITY_NAME

Capability name for meta type document processors.

public static final String
METATYPE_DOCUMENTS_LOCATION

Location of meta type documents.

public static final String
METATYPE_SPECIFICATION_VERSION

Compile time constant for the Specification Version of MetaType Service.

Method Summary

Modifier and TypeMethod and Description
public MetaTypeInformation

Returns:

A MetaTypeInformation object for the specified bundle.
getMetaTypeInformation
(Bundle
The bundle for which meta type information is requested.
bundle
)

Return the MetaType information for the specified bundle.

Field Detail

METATYPE_CAPABILITY_NAMEback to summary
public static final String METATYPE_CAPABILITY_NAME

Capability name for meta type document processors.

Used in Provide-Capability and Require-Capability manifest headers with the osgi.extender namespace. For example:

Require-Capability: osgi.extender;
 filter:="(&(osgi.extender=osgi.metatype)(version>=1.4)(!(version>=2.0)))"
Since
1.3
METATYPE_DOCUMENTS_LOCATIONback to summary
public static final String METATYPE_DOCUMENTS_LOCATION

Location of meta type documents. The MetaType Service will process each entry in the meta type documents directory.

METATYPE_SPECIFICATION_VERSIONback to summary
public static final String METATYPE_SPECIFICATION_VERSION

Compile time constant for the Specification Version of MetaType Service.

Used in Version and Requirement annotations. The value of this compile time constant will change when the specification version of MetaType Service is updated.

Since
1.4

Method Detail

getMetaTypeInformationback to summary
public MetaTypeInformation getMetaTypeInformation(Bundle bundle)

Return the MetaType information for the specified bundle.

Parameters
bundle:Bundle

The bundle for which meta type information is requested.

Returns:MetaTypeInformation

A MetaTypeInformation object for the specified bundle.