OSGi™ Service Platform
Release 4 Version 4.1

org.osgi.framework
Interface Constants


public interface Constants

Defines standard names for the OSGi environment system properties, service properties, and Manifest header attribute keys.

The values associated with these keys are of type java.lang.String, unless otherwise indicated.

Since:
1.1

Field Summary
static java.lang.String ACTIVATION_LAZY
          Bundle activation policy (named "lazy") declaring the bundle must be activated when the first class load is made from the bundle.
static java.lang.String BUNDLE_ACTIVATIONPOLICY
          Manifest header (named "Bundle-ActivationPolicy") identifying the bundle's activation policy.
static java.lang.String BUNDLE_ACTIVATOR
          Manifest header attribute (named "Bundle-Activator") identifying the bundle's activator class.
static java.lang.String BUNDLE_CATEGORY
          Manifest header (named "Bundle-Category") identifying the bundle's category.
static java.lang.String BUNDLE_CLASSPATH
          Manifest header (named "Bundle-ClassPath") identifying a list of directories and embedded JAR files, which are bundle resources used to extend the bundle's classpath.
static java.lang.String BUNDLE_CONTACTADDRESS
          Manifest header (named "Bundle-ContactAddress") identifying the contact address where problems with the bundle may be reported; for example, an email address.
static java.lang.String BUNDLE_COPYRIGHT
          Manifest header (named "Bundle-Copyright") identifying the bundle's copyright information.
static java.lang.String BUNDLE_DESCRIPTION
          Manifest header (named "Bundle-Description") containing a brief description of the bundle's functionality.
static java.lang.String BUNDLE_DOCURL
          Manifest header (named "Bundle-DocURL") identifying the bundle's documentation URL, from which further information about the bundle may be obtained.
static java.lang.String BUNDLE_LOCALIZATION
          Manifest header (named "Bundle-Localization") identifying the base name of the bundle's localization entries.
static java.lang.String BUNDLE_LOCALIZATION_DEFAULT_BASENAME
          Default value for the Bundle-Localization manifest header.
static java.lang.String BUNDLE_MANIFESTVERSION
          Manifest header (named "Bundle-ManifestVersion") identifying the bundle manifest version.
static java.lang.String BUNDLE_NAME
          Manifest header (named "Bundle-Name") identifying the bundle's name.
static java.lang.String BUNDLE_NATIVECODE
          Manifest header (named "Bundle-NativeCode") identifying a number of hardware environments and the native language code libraries that the bundle is carrying for each of these environments.
static java.lang.String BUNDLE_NATIVECODE_LANGUAGE
          Manifest header attribute (named "language") identifying the language in which the native bundle code is written specified in the Bundle-NativeCode manifest header.
static java.lang.String BUNDLE_NATIVECODE_OSNAME
          Manifest header attribute (named "osname") identifying the operating system required to run native bundle code specified in the Bundle-NativeCode manifest header).
static java.lang.String BUNDLE_NATIVECODE_OSVERSION
          Manifest header attribute (named "osversion") identifying the operating system version required to run native bundle code specified in the Bundle-NativeCode manifest header).
static java.lang.String BUNDLE_NATIVECODE_PROCESSOR
          Manifest header attribute (named "processor") identifying the processor required to run native bundle code specified in the Bundle-NativeCode manifest header).
static java.lang.String BUNDLE_REQUIREDEXECUTIONENVIRONMENT
          Manifest header (named "Bundle-RequiredExecutionEnvironment") identifying the required execution environment for the bundle.
static java.lang.String BUNDLE_SYMBOLICNAME
          Manifest header (named "Bundle-SymbolicName") identifying the bundle's symbolic name.
static java.lang.String BUNDLE_SYMBOLICNAME_ATTRIBUTE
          Manifest header attribute (named "bundle-symbolic-name") identifying the symbolic name of a bundle that exports a package specified in the Import-Package manifest header.
static java.lang.String BUNDLE_UPDATELOCATION
          Manifest header (named "Bundle-UpdateLocation") identifying the location from which a new bundle version is obtained during a bundle update operation.
static java.lang.String BUNDLE_VENDOR
          Manifest header (named "Bundle-Vendor") identifying the bundle's vendor.
static java.lang.String BUNDLE_VERSION
          Manifest header (named "Bundle-Version") identifying the bundle's version.
static java.lang.String BUNDLE_VERSION_ATTRIBUTE
          Manifest header attribute (named "bundle-version") identifying a range of versions for a bundle specified in the Require-Bundle or Fragment-Host manifest headers.
static java.lang.String DYNAMICIMPORT_PACKAGE
          Manifest header (named "DynamicImport-Package") identifying the packages that the bundle may dynamically import during execution.
static java.lang.String EXCLUDE_DIRECTIVE
          Manifest header directive (named "exclude").
static java.lang.String EXPORT_PACKAGE
          Manifest header (named "Export-Package") identifying the packages that the bundle offers to the Framework for export.
static java.lang.String EXPORT_SERVICE
          Deprecated. As of 1.2.
static java.lang.String EXTENSION_BOOTCLASSPATH
          Manifest header directive value (named "bootclasspath") identifying the type of extension fragment.
static java.lang.String EXTENSION_DIRECTIVE
          Manifest header directive (named "extension") identifying the type of the extension fragment.
static java.lang.String EXTENSION_FRAMEWORK
          Manifest header directive value (named "framework") identifying the type of extension fragment.
static java.lang.String FRAGMENT_ATTACHMENT_ALWAYS
          Manifest header directive value (named "always") identifying a fragment attachment type of always.
static java.lang.String FRAGMENT_ATTACHMENT_DIRECTIVE
          Manifest header directive (named "fragment-attachment") identifying if and when a fragment may attach to a host bundle.
static java.lang.String FRAGMENT_ATTACHMENT_NEVER
          Manifest header directive value (named "never") identifying a fragment attachment type of never.
static java.lang.String FRAGMENT_ATTACHMENT_RESOLVETIME
          Manifest header directive value (named "resolve-time") identifying a fragment attachment type of resolve-time.
static java.lang.String FRAGMENT_HOST
          Manifest header (named "Fragment-Host") identifying the symbolic name of another bundle for which that the bundle is a fragment.
static java.lang.String FRAMEWORK_BOOTDELEGATION
          Framework environment property (named "org.osgi.framework.bootdelegation") identifying packages for which the Framework must delegate class loading to the boot class path.
static java.lang.String FRAMEWORK_EXECUTIONENVIRONMENT
          Framework environment property (named "org.osgi.framework.executionenvironment") identifying execution environments provided by the Framework.
static java.lang.String FRAMEWORK_LANGUAGE
          Framework environment property (named "org.osgi.framework.language") identifying the Framework implementation language (see ISO 639 for possible values).
static java.lang.String FRAMEWORK_OS_NAME
          Framework environment property (named "org.osgi.framework.os.name") identifying the Framework host-computer's operating system.
static java.lang.String FRAMEWORK_OS_VERSION
          Framework environment property (named "org.osgi.framework.os.version") identifying the Framework host-computer's operating system version number.
static java.lang.String FRAMEWORK_PROCESSOR
          Framework environment property (named "org.osgi.framework.processor") identifying the Framework host-computer's processor name.
static java.lang.String FRAMEWORK_SYSTEMPACKAGES
          Framework environment property (named "org.osgi.framework.system.packages") identifying package which the system bundle must export.
static java.lang.String FRAMEWORK_VENDOR
          Framework environment property (named "org.osgi.framework.vendor") identifying the Framework implementation vendor.
static java.lang.String FRAMEWORK_VERSION
          Framework environment property (named "org.osgi.framework.version") identifying the Framework version.
static java.lang.String IMPORT_PACKAGE
          Manifest header (named "Import-Package") identifying the packages on which the bundle depends.
static java.lang.String IMPORT_SERVICE
          Deprecated. As of 1.2.
static java.lang.String INCLUDE_DIRECTIVE
          Manifest header directive (named "include").
static java.lang.String MANDATORY_DIRECTIVE
          Manifest header directive (named "mandatory") identifying names of matching attributes which must be specified by matching Import-Package statements in the Export-Package manifest header.
static java.lang.String OBJECTCLASS
          Service property (named "objectClass") identifying all of the class names under which a service was registered in the Framework (of type java.lang.String[]).
static java.lang.String PACKAGE_SPECIFICATION_VERSION
          Deprecated. As of 1.3. This has been replaced by VERSION_ATTRIBUTE.
static java.lang.String REQUIRE_BUNDLE
          Manifest header (named "Require-Bundle") identifying the symbolic names of other bundles required by the bundle.
static java.lang.String RESOLUTION_DIRECTIVE
          Manifest header directive (named "resolution") identifying the resolution type in the Import-Package or Require-Bundle manifest header.
static java.lang.String RESOLUTION_MANDATORY
          Manifest header directive value (named "mandatory") identifying a mandatory resolution type.
static java.lang.String RESOLUTION_OPTIONAL
          Manifest header directive value (named "optional") identifying an optional resolution type.
static java.lang.String SELECTION_FILTER_ATTRIBUTE
          Manifest header attribute (named "selection-filter") is used for selection by filtering based upon system properties.
static java.lang.String SERVICE_DESCRIPTION
          Service property (named "service.description") identifying a service's description.
static java.lang.String SERVICE_ID
          Service property (named "service.id") identifying a service's registration number (of type java.lang.Long).
static java.lang.String SERVICE_PID
          Service property (named "service.pid") identifying a service's persistent identifier.
static java.lang.String SERVICE_RANKING
          Service property (named "service.ranking") identifying a service's ranking number (of type java.lang.Integer).
static java.lang.String SERVICE_VENDOR
          Service property (named "service.vendor") identifying a service's vendor.
static java.lang.String SINGLETON_DIRECTIVE
          Manifest header directive (named "singleton") identifying whether a bundle is a singleton.
static java.lang.String SUPPORTS_BOOTCLASSPATH_EXTENSION
          Framework environment property (named "org.osgi.supports.bootclasspath.extension") identifying whether the Framework supports bootclasspath extension bundles.
static java.lang.String SUPPORTS_FRAMEWORK_EXTENSION
          Framework environment property (named "org.osgi.supports.framework.extension") identifying whether the Framework supports framework extension bundles.
static java.lang.String SUPPORTS_FRAMEWORK_FRAGMENT
          Framework environment property (named "org.osgi.supports.framework.fragment") identifying whether the Framework supports fragment bundles.
static java.lang.String SUPPORTS_FRAMEWORK_REQUIREBUNDLE
          Framework environment property (named "org.osgi.supports.framework.requirebundle") identifying whether the Framework supports the Require-Bundle manifest header.
static java.lang.String SYSTEM_BUNDLE_LOCATION
          Location identifier of the OSGi system bundle , which is defined to be "System Bundle".
static java.lang.String SYSTEM_BUNDLE_SYMBOLICNAME
          Alias for the symbolic name of the OSGi system bundle .
static java.lang.String USES_DIRECTIVE
          Manifest header directive (named "uses") identifying a list of packages that an exported package uses.
static java.lang.String VERSION_ATTRIBUTE
          Manifest header attribute (named "version") identifying the version of a package specified in the Export-Package or Import-Package manifest header.
static java.lang.String VISIBILITY_DIRECTIVE
          Manifest header directive (named "visibility") identifying the visibility of a reqiured bundle in the Require-Bundle manifest header.
static java.lang.String VISIBILITY_PRIVATE
          Manifest header directive value (named "private") identifying a private visibility type.
static java.lang.String VISIBILITY_REEXPORT
          Manifest header directive value (named "reexport") identifying a reexport visibility type.
 

Field Detail

SYSTEM_BUNDLE_LOCATION

public static final java.lang.String SYSTEM_BUNDLE_LOCATION
Location identifier of the OSGi system bundle , which is defined to be "System Bundle".

See Also:
Constant Field Values

SYSTEM_BUNDLE_SYMBOLICNAME

public static final java.lang.String SYSTEM_BUNDLE_SYMBOLICNAME
Alias for the symbolic name of the OSGi system bundle . It is defined to be "system.bundle".

Since:
1.3
See Also:
Constant Field Values

BUNDLE_CATEGORY

public static final java.lang.String BUNDLE_CATEGORY
Manifest header (named "Bundle-Category") identifying the bundle's category.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

See Also:
Constant Field Values

BUNDLE_CLASSPATH

public static final java.lang.String BUNDLE_CLASSPATH
Manifest header (named "Bundle-ClassPath") identifying a list of directories and embedded JAR files, which are bundle resources used to extend the bundle's classpath.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

See Also:
Constant Field Values

BUNDLE_COPYRIGHT

public static final java.lang.String BUNDLE_COPYRIGHT
Manifest header (named "Bundle-Copyright") identifying the bundle's copyright information.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

See Also:
Constant Field Values

BUNDLE_DESCRIPTION

public static final java.lang.String BUNDLE_DESCRIPTION
Manifest header (named "Bundle-Description") containing a brief description of the bundle's functionality.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

See Also:
Constant Field Values

BUNDLE_NAME

public static final java.lang.String BUNDLE_NAME
Manifest header (named "Bundle-Name") identifying the bundle's name.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

See Also:
Constant Field Values

BUNDLE_NATIVECODE

public static final java.lang.String BUNDLE_NATIVECODE
Manifest header (named "Bundle-NativeCode") identifying a number of hardware environments and the native language code libraries that the bundle is carrying for each of these environments.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

See Also:
Constant Field Values

EXPORT_PACKAGE

public static final java.lang.String EXPORT_PACKAGE
Manifest header (named "Export-Package") identifying the packages that the bundle offers to the Framework for export.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

See Also:
Constant Field Values

EXPORT_SERVICE

public static final java.lang.String EXPORT_SERVICE
Deprecated. As of 1.2.

Manifest header (named "Export-Service") identifying the fully qualified class names of the services that the bundle may register (used for informational purposes only).

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

See Also:
Constant Field Values

IMPORT_PACKAGE

public static final java.lang.String IMPORT_PACKAGE
Manifest header (named "Import-Package") identifying the packages on which the bundle depends.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

See Also:
Constant Field Values

DYNAMICIMPORT_PACKAGE

public static final java.lang.String DYNAMICIMPORT_PACKAGE
Manifest header (named "DynamicImport-Package") identifying the packages that the bundle may dynamically import during execution.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

Since:
1.2
See Also:
Constant Field Values

IMPORT_SERVICE

public static final java.lang.String IMPORT_SERVICE
Deprecated. As of 1.2.

Manifest header (named "Import-Service") identifying the fully qualified class names of the services that the bundle requires (used for informational purposes only).

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

See Also:
Constant Field Values

BUNDLE_VENDOR

public static final java.lang.String BUNDLE_VENDOR
Manifest header (named "Bundle-Vendor") identifying the bundle's vendor.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

See Also:
Constant Field Values

BUNDLE_VERSION

public static final java.lang.String BUNDLE_VERSION
Manifest header (named "Bundle-Version") identifying the bundle's version.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

See Also:
Constant Field Values

BUNDLE_DOCURL

public static final java.lang.String BUNDLE_DOCURL
Manifest header (named "Bundle-DocURL") identifying the bundle's documentation URL, from which further information about the bundle may be obtained.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

See Also:
Constant Field Values

BUNDLE_CONTACTADDRESS

public static final java.lang.String BUNDLE_CONTACTADDRESS
Manifest header (named "Bundle-ContactAddress") identifying the contact address where problems with the bundle may be reported; for example, an email address.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

See Also:
Constant Field Values

BUNDLE_ACTIVATOR

public static final java.lang.String BUNDLE_ACTIVATOR
Manifest header attribute (named "Bundle-Activator") identifying the bundle's activator class.

If present, this header specifies the name of the bundle resource class that implements the BundleActivator interface and whose start and stop methods are called by the Framework when the bundle is started and stopped, respectively.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

See Also:
Constant Field Values

BUNDLE_UPDATELOCATION

public static final java.lang.String BUNDLE_UPDATELOCATION
Manifest header (named "Bundle-UpdateLocation") identifying the location from which a new bundle version is obtained during a bundle update operation.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

See Also:
Constant Field Values

PACKAGE_SPECIFICATION_VERSION

public static final java.lang.String PACKAGE_SPECIFICATION_VERSION
Deprecated. As of 1.3. This has been replaced by VERSION_ATTRIBUTE.

Manifest header attribute (named "specification-version") identifying the version of a package specified in the Export-Package or Import-Package manifest header.

See Also:
Constant Field Values

BUNDLE_NATIVECODE_PROCESSOR

public static final java.lang.String BUNDLE_NATIVECODE_PROCESSOR
Manifest header attribute (named "processor") identifying the processor required to run native bundle code specified in the Bundle-NativeCode manifest header).

The attribute value is encoded in the Bundle-NativeCode manifest header like:

     Bundle-NativeCode: http.so ; processor=x86 ...
 

See Also:
Constant Field Values

BUNDLE_NATIVECODE_OSNAME

public static final java.lang.String BUNDLE_NATIVECODE_OSNAME
Manifest header attribute (named "osname") identifying the operating system required to run native bundle code specified in the Bundle-NativeCode manifest header).

The attribute value is encoded in the Bundle-NativeCode manifest header like:

     Bundle-NativeCode: http.so ; osname=Linux ...
 

See Also:
Constant Field Values

BUNDLE_NATIVECODE_OSVERSION

public static final java.lang.String BUNDLE_NATIVECODE_OSVERSION
Manifest header attribute (named "osversion") identifying the operating system version required to run native bundle code specified in the Bundle-NativeCode manifest header).

The attribute value is encoded in the Bundle-NativeCode manifest header like:

     Bundle-NativeCode: http.so ; osversion="2.34" ...
 

See Also:
Constant Field Values

BUNDLE_NATIVECODE_LANGUAGE

public static final java.lang.String BUNDLE_NATIVECODE_LANGUAGE
Manifest header attribute (named "language") identifying the language in which the native bundle code is written specified in the Bundle-NativeCode manifest header. See ISO 639 for possible values.

The attribute value is encoded in the Bundle-NativeCode manifest header like:

     Bundle-NativeCode: http.so ; language=nl_be ...
 

See Also:
Constant Field Values

BUNDLE_REQUIREDEXECUTIONENVIRONMENT

public static final java.lang.String BUNDLE_REQUIREDEXECUTIONENVIRONMENT
Manifest header (named "Bundle-RequiredExecutionEnvironment") identifying the required execution environment for the bundle. The service platform may run this bundle if any of the execution environments named in this header matches one of the execution environments it implements.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

Since:
1.2
See Also:
Constant Field Values

FRAMEWORK_VERSION

public static final java.lang.String FRAMEWORK_VERSION
Framework environment property (named "org.osgi.framework.version") identifying the Framework version.

The value of this property may be retrieved by calling the BundleContext.getProperty method.

See Also:
Constant Field Values

FRAMEWORK_VENDOR

public static final java.lang.String FRAMEWORK_VENDOR
Framework environment property (named "org.osgi.framework.vendor") identifying the Framework implementation vendor.

The value of this property may be retrieved by calling the BundleContext.getProperty method.

See Also:
Constant Field Values

FRAMEWORK_LANGUAGE

public static final java.lang.String FRAMEWORK_LANGUAGE
Framework environment property (named "org.osgi.framework.language") identifying the Framework implementation language (see ISO 639 for possible values).

The value of this property may be retrieved by calling the BundleContext.getProperty method.

See Also:
Constant Field Values

FRAMEWORK_OS_NAME

public static final java.lang.String FRAMEWORK_OS_NAME
Framework environment property (named "org.osgi.framework.os.name") identifying the Framework host-computer's operating system.

The value of this property may be retrieved by calling the BundleContext.getProperty method.

See Also:
Constant Field Values

FRAMEWORK_OS_VERSION

public static final java.lang.String FRAMEWORK_OS_VERSION
Framework environment property (named "org.osgi.framework.os.version") identifying the Framework host-computer's operating system version number.

The value of this property may be retrieved by calling the BundleContext.getProperty method.

See Also:
Constant Field Values

FRAMEWORK_PROCESSOR

public static final java.lang.String FRAMEWORK_PROCESSOR
Framework environment property (named "org.osgi.framework.processor") identifying the Framework host-computer's processor name.

The value of this property may be retrieved by calling the BundleContext.getProperty method.

See Also:
Constant Field Values

FRAMEWORK_EXECUTIONENVIRONMENT

public static final java.lang.String FRAMEWORK_EXECUTIONENVIRONMENT
Framework environment property (named "org.osgi.framework.executionenvironment") identifying execution environments provided by the Framework.

The value of this property may be retrieved by calling the BundleContext.getProperty method.

Since:
1.2
See Also:
Constant Field Values

FRAMEWORK_BOOTDELEGATION

public static final java.lang.String FRAMEWORK_BOOTDELEGATION
Framework environment property (named "org.osgi.framework.bootdelegation") identifying packages for which the Framework must delegate class loading to the boot class path.

The value of this property may be retrieved by calling the BundleContext.getProperty method.

Since:
1.3
See Also:
Constant Field Values

FRAMEWORK_SYSTEMPACKAGES

public static final java.lang.String FRAMEWORK_SYSTEMPACKAGES
Framework environment property (named "org.osgi.framework.system.packages") identifying package which the system bundle must export.

The value of this property may be retrieved by calling the BundleContext.getProperty method.

Since:
1.3
See Also:
Constant Field Values

SUPPORTS_FRAMEWORK_EXTENSION

public static final java.lang.String SUPPORTS_FRAMEWORK_EXTENSION
Framework environment property (named "org.osgi.supports.framework.extension") identifying whether the Framework supports framework extension bundles. As of version 1.4, the value of this property must be true. The Framework must support framework extension bundles.

The value of this property may be retrieved by calling the BundleContext.getProperty method.

Since:
1.3
See Also:
Constant Field Values

SUPPORTS_BOOTCLASSPATH_EXTENSION

public static final java.lang.String SUPPORTS_BOOTCLASSPATH_EXTENSION
Framework environment property (named "org.osgi.supports.bootclasspath.extension") identifying whether the Framework supports bootclasspath extension bundles. If the value of this property is true, then the Framework supports bootclasspath extension bundles. The default value is false.

The value of this property may be retrieved by calling the BundleContext.getProperty method.

Since:
1.3
See Also:
Constant Field Values

SUPPORTS_FRAMEWORK_FRAGMENT

public static final java.lang.String SUPPORTS_FRAMEWORK_FRAGMENT
Framework environment property (named "org.osgi.supports.framework.fragment") identifying whether the Framework supports fragment bundles. As of version 1.4, the value of this property must be true. The Framework must support fragment bundles.

The value of this property may be retrieved by calling the BundleContext.getProperty method.

Since:
1.3
See Also:
Constant Field Values

SUPPORTS_FRAMEWORK_REQUIREBUNDLE

public static final java.lang.String SUPPORTS_FRAMEWORK_REQUIREBUNDLE
Framework environment property (named "org.osgi.supports.framework.requirebundle") identifying whether the Framework supports the Require-Bundle manifest header. As of version 1.4, the value of this property must be true. The Framework must support the Require-Bundle manifest header.

The value of this property may be retrieved by calling the BundleContext.getProperty method.

Since:
1.3
See Also:
Constant Field Values

OBJECTCLASS

public static final java.lang.String OBJECTCLASS
Service property (named "objectClass") identifying all of the class names under which a service was registered in the Framework (of type java.lang.String[]).

This property is set by the Framework when a service is registered.

See Also:
Constant Field Values

SERVICE_ID

public static final java.lang.String SERVICE_ID
Service property (named "service.id") identifying a service's registration number (of type java.lang.Long).

The value of this property is assigned by the Framework when a service is registered. The Framework assigns a unique value that is larger than all previously assigned values since the Framework was started. These values are NOT persistent across restarts of the Framework.

See Also:
Constant Field Values

SERVICE_PID

public static final java.lang.String SERVICE_PID
Service property (named "service.pid") identifying a service's persistent identifier.

This property may be supplied in the properties Dictionary object passed to the BundleContext.registerService method.

A service's persistent identifier uniquely identifies the service and persists across multiple Framework invocations.

By convention, every bundle has its own unique namespace, starting with the bundle's identifier (see Bundle.getBundleId()) and followed by a dot (.). A bundle may use this as the prefix of the persistent identifiers for the services it registers.

See Also:
Constant Field Values

SERVICE_RANKING

public static final java.lang.String SERVICE_RANKING
Service property (named "service.ranking") identifying a service's ranking number (of type java.lang.Integer).

This property may be supplied in the properties Dictionary object passed to the BundleContext.registerService method.

The service ranking is used by the Framework to determine the default service to be returned from a call to the BundleContext.getServiceReference(java.lang.String) method: If more than one service implements the specified class, the ServiceReference object with the highest ranking is returned.

The default ranking is zero (0). A service with a ranking of Integer.MAX_VALUE is very likely to be returned as the default service, whereas a service with a ranking of Integer.MIN_VALUE is very unlikely to be returned.

If the supplied property value is not of type java.lang.Integer, it is deemed to have a ranking value of zero.

See Also:
Constant Field Values

SERVICE_VENDOR

public static final java.lang.String SERVICE_VENDOR
Service property (named "service.vendor") identifying a service's vendor.

This property may be supplied in the properties Dictionary object passed to the BundleContext.registerService method.

See Also:
Constant Field Values

SERVICE_DESCRIPTION

public static final java.lang.String SERVICE_DESCRIPTION
Service property (named "service.description") identifying a service's description.

This property may be supplied in the properties Dictionary object passed to the BundleContext.registerService method.

See Also:
Constant Field Values

BUNDLE_SYMBOLICNAME

public static final java.lang.String BUNDLE_SYMBOLICNAME
Manifest header (named "Bundle-SymbolicName") identifying the bundle's symbolic name.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

Since:
1.3
See Also:
Constant Field Values

SINGLETON_DIRECTIVE

public static final java.lang.String SINGLETON_DIRECTIVE
Manifest header directive (named "singleton") identifying whether a bundle is a singleton. The default value is false.

The directive value is encoded in the Bundle-SymbolicName manifest header like:

     Bundle-SymbolicName: com.acme.module.test; singleton:=true
 

Since:
1.3
See Also:
Constant Field Values

FRAGMENT_ATTACHMENT_DIRECTIVE

public static final java.lang.String FRAGMENT_ATTACHMENT_DIRECTIVE
Manifest header directive (named "fragment-attachment") identifying if and when a fragment may attach to a host bundle. The default value is "always".

The directive value is encoded in the Bundle-SymbolicName manifest header like:

     Bundle-SymbolicName: com.acme.module.test; fragment-attachment:="never"
 

Since:
1.3
See Also:
FRAGMENT_ATTACHMENT_ALWAYS, FRAGMENT_ATTACHMENT_RESOLVETIME, FRAGMENT_ATTACHMENT_NEVER, Constant Field Values

FRAGMENT_ATTACHMENT_ALWAYS

public static final java.lang.String FRAGMENT_ATTACHMENT_ALWAYS
Manifest header directive value (named "always") identifying a fragment attachment type of always. A fragment attachment type of always indicates that fragments are allowed to attach to the host bundle at any time (while the host is resolved or during the process of resolving the host bundle).

The directive value is encoded in the Bundle-SymbolicName manifest header like:

     Bundle-SymbolicName: com.acme.module.test; fragment-attachment:="always"
 

Since:
1.3
See Also:
FRAGMENT_ATTACHMENT_DIRECTIVE, Constant Field Values

FRAGMENT_ATTACHMENT_RESOLVETIME

public static final java.lang.String FRAGMENT_ATTACHMENT_RESOLVETIME
Manifest header directive value (named "resolve-time") identifying a fragment attachment type of resolve-time. A fragment attachment type of resolve-time indicates that fragments are allowed to attach to the host bundle only during the process of resolving the host bundle.

The directive value is encoded in the Bundle-SymbolicName manifest header like:

     Bundle-SymbolicName: com.acme.module.test; fragment-attachment:="resolve-time"
 

Since:
1.3
See Also:
FRAGMENT_ATTACHMENT_DIRECTIVE, Constant Field Values

FRAGMENT_ATTACHMENT_NEVER

public static final java.lang.String FRAGMENT_ATTACHMENT_NEVER
Manifest header directive value (named "never") identifying a fragment attachment type of never. A fragment attachment type of never indicates that no fragments are allowed to attach to the host bundle at any time.

The directive value is encoded in the Bundle-SymbolicName manifest header like:

     Bundle-SymbolicName: com.acme.module.test; fragment-attachment:="never"
 

Since:
1.3
See Also:
FRAGMENT_ATTACHMENT_DIRECTIVE, Constant Field Values

BUNDLE_LOCALIZATION

public static final java.lang.String BUNDLE_LOCALIZATION
Manifest header (named "Bundle-Localization") identifying the base name of the bundle's localization entries.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

Since:
1.3
See Also:
BUNDLE_LOCALIZATION_DEFAULT_BASENAME, Constant Field Values

BUNDLE_LOCALIZATION_DEFAULT_BASENAME

public static final java.lang.String BUNDLE_LOCALIZATION_DEFAULT_BASENAME
Default value for the Bundle-Localization manifest header.

Since:
1.3
See Also:
BUNDLE_LOCALIZATION, Constant Field Values

REQUIRE_BUNDLE

public static final java.lang.String REQUIRE_BUNDLE
Manifest header (named "Require-Bundle") identifying the symbolic names of other bundles required by the bundle.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

Since:
1.3
See Also:
Constant Field Values

BUNDLE_VERSION_ATTRIBUTE

public static final java.lang.String BUNDLE_VERSION_ATTRIBUTE
Manifest header attribute (named "bundle-version") identifying a range of versions for a bundle specified in the Require-Bundle or Fragment-Host manifest headers. The default value is 0.0.0.

The attribute value is encoded in the Require-Bundle manifest header like:

     Require-Bundle: com.acme.module.test; bundle-version="1.1"
     Require-Bundle: com.acme.module.test; bundle-version="[1.0,2.0)"
 

The bundle-version attribute value uses a mathematical interval notation to specify a range of bundle versions. A bundle-version attribute value specified as a single version means a version range that includes any bundle version greater than or equal to the specified version.

Since:
1.3
See Also:
Constant Field Values

FRAGMENT_HOST

public static final java.lang.String FRAGMENT_HOST
Manifest header (named "Fragment-Host") identifying the symbolic name of another bundle for which that the bundle is a fragment.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

Since:
1.3
See Also:
Constant Field Values

SELECTION_FILTER_ATTRIBUTE

public static final java.lang.String SELECTION_FILTER_ATTRIBUTE
Manifest header attribute (named "selection-filter") is used for selection by filtering based upon system properties.

The attribute value is encoded in manifest headers like:

     Bundle-NativeCode: libgtk.so; selection-filter="(ws=gtk)"; ...
 

Since:
1.3
See Also:
Constant Field Values

BUNDLE_MANIFESTVERSION

public static final java.lang.String BUNDLE_MANIFESTVERSION
Manifest header (named "Bundle-ManifestVersion") identifying the bundle manifest version. A bundle manifest may express the version of the syntax in which it is written by specifying a bundle manifest version. Bundles exploiting OSGi R4, or later, syntax must specify a bundle manifest version.

The bundle manifest version defined by OSGi R4 or, more specifically, by V1.3 of the OSGi Framework Specification is "2".

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

Since:
1.3
See Also:
Constant Field Values

VERSION_ATTRIBUTE

public static final java.lang.String VERSION_ATTRIBUTE
Manifest header attribute (named "version") identifying the version of a package specified in the Export-Package or Import-Package manifest header.

The attribute value is encoded in the Export-Package or Import-Package manifest header like:

     Import-Package: org.osgi.framework; version="1.1"
 

Since:
1.3
See Also:
Constant Field Values

BUNDLE_SYMBOLICNAME_ATTRIBUTE

public static final java.lang.String BUNDLE_SYMBOLICNAME_ATTRIBUTE
Manifest header attribute (named "bundle-symbolic-name") identifying the symbolic name of a bundle that exports a package specified in the Import-Package manifest header.

The attribute value is encoded in the Import-Package manifest header like:

     Import-Package: org.osgi.framework; bundle-symbolic-name="com.acme.module.test"
 

Since:
1.3
See Also:
Constant Field Values

RESOLUTION_DIRECTIVE

public static final java.lang.String RESOLUTION_DIRECTIVE
Manifest header directive (named "resolution") identifying the resolution type in the Import-Package or Require-Bundle manifest header.

The directive value is encoded in the Import-Package or Require-Bundle manifest header like:

     Import-Package: org.osgi.framework; resolution:="optional"
     Require-Bundle: com.acme.module.test; resolution:="optional"
 

Since:
1.3
See Also:
RESOLUTION_MANDATORY, RESOLUTION_OPTIONAL, Constant Field Values

RESOLUTION_MANDATORY

public static final java.lang.String RESOLUTION_MANDATORY
Manifest header directive value (named "mandatory") identifying a mandatory resolution type. A mandatory resolution type indicates that the import package or require bundle must be resolved when the bundle is resolved. If such an import or require bundle cannot be resolved, the module fails to resolve.

The directive value is encoded in the Import-Package or Require-Bundle manifest header like:

     Import-Package: org.osgi.framework; resolution:="manditory"
     Require-Bundle: com.acme.module.test; resolution:="manditory"
 

Since:
1.3
See Also:
RESOLUTION_DIRECTIVE, Constant Field Values

RESOLUTION_OPTIONAL

public static final java.lang.String RESOLUTION_OPTIONAL
Manifest header directive value (named "optional") identifying an optional resolution type. An optional resolution type indicates that the import or require bundle is optional and the bundle may be resolved without the import or require bundle being resolved. If the import or require bundle is not resolved when the bundle is resolved, the import or require bundle may not be resolved before the bundle is refreshed.

The directive value is encoded in the Import-Package or Require-Bundle manifest header like:

     Import-Package: org.osgi.framework; resolution:="optional"
     Require-Bundle: com.acme.module.test; resolution:="optional"
 

Since:
1.3
See Also:
RESOLUTION_DIRECTIVE, Constant Field Values

USES_DIRECTIVE

public static final java.lang.String USES_DIRECTIVE
Manifest header directive (named "uses") identifying a list of packages that an exported package uses.

The directive value is encoded in the Export-Package manifest header like:

     Export-Package: org.osgi.util.tracker; uses:="org.osgi.framework"
 

Since:
1.3
See Also:
Constant Field Values

INCLUDE_DIRECTIVE

public static final java.lang.String INCLUDE_DIRECTIVE
Manifest header directive (named "include").

This directive is used by the Import-Package manifest header to identify a list of classes of the specified package which must be allowed to be exported. The directive value is encoded in the Import-Package manifest header like:

     Import-Package: org.osgi.framework; include:="MyClass*"
 

This directive is also used by the Bundle-ActivationPolicy manifest header to identify the packages from which class loads will trigger lazy activation. The directive value is encoded in the Bundle-ActivationPolicy manifest header like:

     Bundle-ActivationPolicy: lazy; include:="org.osgi.framework"
 

Since:
1.3
See Also:
Constant Field Values

EXCLUDE_DIRECTIVE

public static final java.lang.String EXCLUDE_DIRECTIVE
Manifest header directive (named "exclude").

This directive is used by the Export-Package manifest header to identify a list of classes of the specified package which must not be allowed to be exported. The directive value is encoded in the Export-Package manifest header like:

     Export-Package: org.osgi.framework; exclude:="*Impl"
 

This directive is also used by the Bundle-ActivationPolicy manifest header to identify the packages from which class loads will not trigger lazy activation. The directive value is encoded in the Bundle-ActivationPolicy manifest header like:

     Bundle-ActivationPolicy: lazy; exclude:="org.osgi.framework"
 

Since:
1.3
See Also:
Constant Field Values

MANDATORY_DIRECTIVE

public static final java.lang.String MANDATORY_DIRECTIVE
Manifest header directive (named "mandatory") identifying names of matching attributes which must be specified by matching Import-Package statements in the Export-Package manifest header.

The directive value is encoded in the Export-Package manifest header like:

     Export-Package: org.osgi.framework; mandatory:="bundle-symbolic-name"
 

Since:
1.3
See Also:
Constant Field Values

VISIBILITY_DIRECTIVE

public static final java.lang.String VISIBILITY_DIRECTIVE
Manifest header directive (named "visibility") identifying the visibility of a reqiured bundle in the Require-Bundle manifest header.

The directive value is encoded in the Require-Bundle manifest header like:

     Require-Bundle: com.acme.module.test; visibility:="reexport"
 

Since:
1.3
See Also:
VISIBILITY_PRIVATE, VISIBILITY_REEXPORT, Constant Field Values

VISIBILITY_PRIVATE

public static final java.lang.String VISIBILITY_PRIVATE
Manifest header directive value (named "private") identifying a private visibility type. A private visibility type indicates that any packages that are exported by the required bundle are not made visible on the export signature of the requiring bundle.

The directive value is encoded in the Require-Bundle manifest header like:

     Require-Bundle: com.acme.module.test; visibility:="private"
 

Since:
1.3
See Also:
VISIBILITY_DIRECTIVE, Constant Field Values

VISIBILITY_REEXPORT

public static final java.lang.String VISIBILITY_REEXPORT
Manifest header directive value (named "reexport") identifying a reexport visibility type. A reexport visibility type indicates any packages that are exported by the required bundle are re-exported by the requiring bundle. Any arbitrary arbitrary matching attributes with which they were exported by the required bundle are deleted.

The directive value is encoded in the Require-Bundle manifest header like:

     Require-Bundle: com.acme.module.test; visibility:="reexport"
 

Since:
1.3
See Also:
VISIBILITY_DIRECTIVE, Constant Field Values

EXTENSION_DIRECTIVE

public static final java.lang.String EXTENSION_DIRECTIVE
Manifest header directive (named "extension") identifying the type of the extension fragment.

The directive value is encoded in the Fragment-Host manifest header like:

     Fragment-Host: system.bundle; extension:="framework"
 

Since:
1.3
See Also:
EXTENSION_FRAMEWORK, EXTENSION_BOOTCLASSPATH, Constant Field Values

EXTENSION_FRAMEWORK

public static final java.lang.String EXTENSION_FRAMEWORK
Manifest header directive value (named "framework") identifying the type of extension fragment. An extension fragment type of framework indicates that the extension fragment is to be loaded by the framework's class loader.

The directive value is encoded in the Fragment-Host manifest header like:

     Fragment-Host: system.bundle; extension:="framework"
 

Since:
1.3
See Also:
EXTENSION_DIRECTIVE, Constant Field Values

EXTENSION_BOOTCLASSPATH

public static final java.lang.String EXTENSION_BOOTCLASSPATH
Manifest header directive value (named "bootclasspath") identifying the type of extension fragment. An extension fragment type of bootclasspath indicates that the extension fragment is to be loaded by the boot class loader.

The directive value is encoded in the Fragment-Host manifest header like:

     Fragment-Host: system.bundle; extension:="bootclasspath"
 

Since:
1.3
See Also:
EXTENSION_DIRECTIVE, Constant Field Values

BUNDLE_ACTIVATIONPOLICY

public static final java.lang.String BUNDLE_ACTIVATIONPOLICY
Manifest header (named "Bundle-ActivationPolicy") identifying the bundle's activation policy.

The attribute value may be retrieved from the Dictionary object returned by the Bundle.getHeaders method.

Since:
1.4
See Also:
ACTIVATION_LAZY, INCLUDE_DIRECTIVE, EXCLUDE_DIRECTIVE, Constant Field Values

ACTIVATION_LAZY

public static final java.lang.String ACTIVATION_LAZY
Bundle activation policy (named "lazy") declaring the bundle must be activated when the first class load is made from the bundle.

A bundle with the lazy activation policy that is started with the START_ACTIVATION_POLICY option will wait in the STARTING state until the first class load from the bundle occurs. The bundle will then be activated before the class is returned to the requestor.

The activation policy value is specified as in the Bundle-ActivationPolicy manifest header like:

       Bundle-ActivationPolicy: lazy
 

Since:
1.4
See Also:
BUNDLE_ACTIVATIONPOLICY, Bundle.start(int), Bundle.START_ACTIVATION_POLICY, Constant Field Values

OSGi™ Service Platform
Release 4 Version 4.1

Copyright © OSGi Alliance (2000, 2007). All Rights Reserved. Licensed under the OSGi Specification License, Version 1.0