You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2009/06/08 21:31:08 UTC
svn commit: r782737 [4/8] - in
/felix/trunk/org.osgi.core/src/main/java/org/osgi: framework/
framework/hooks/ framework/hooks/service/ framework/launch/
service/condpermadmin/ service/packageadmin/ service/permissionadmin/
service/startlevel/ service/url/
Modified: felix/trunk/org.osgi.core/src/main/java/org/osgi/framework/Constants.java
URL: http://svn.apache.org/viewvc/felix/trunk/org.osgi.core/src/main/java/org/osgi/framework/Constants.java?rev=782737&r1=782736&r2=782737&view=diff
==============================================================================
--- felix/trunk/org.osgi.core/src/main/java/org/osgi/framework/Constants.java (original)
+++ felix/trunk/org.osgi.core/src/main/java/org/osgi/framework/Constants.java Mon Jun 8 19:31:06 2009
@@ -1,7 +1,5 @@
/*
- * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/Constants.java,v 1.32 2007/02/20 00:07:22 hargrave Exp $
- *
- * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2009). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,10 +22,10 @@
*
* <p>
* The values associated with these keys are of type
- * <code>java.lang.String</code>, unless otherwise indicated.
+ * <code>String</code>, unless otherwise indicated.
*
* @since 1.1
- * @version $Revision: 1.32 $
+ * @version $Revision: 6552 $
*/
public interface Constants {
@@ -46,8 +44,7 @@
public static final String SYSTEM_BUNDLE_SYMBOLICNAME = "system.bundle";
/**
- * Manifest header (named "Bundle-Category") identifying the
- * bundle's category.
+ * Manifest header identifying the bundle's category.
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
* object returned by the <code>Bundle.getHeaders</code> method.
@@ -55,9 +52,8 @@
public static final String BUNDLE_CATEGORY = "Bundle-Category";
/**
- * 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.
+ * Manifest header identifying a list of directories and embedded JAR files,
+ * which are bundle resources used to extend the bundle's classpath.
*
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
@@ -66,8 +62,7 @@
public static final String BUNDLE_CLASSPATH = "Bundle-ClassPath";
/**
- * Manifest header (named "Bundle-Copyright") identifying the
- * bundle's copyright information.
+ * Manifest header identifying the bundle's copyright information.
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
* object returned by the <code>Bundle.getHeaders</code> method.
@@ -75,8 +70,8 @@
public static final String BUNDLE_COPYRIGHT = "Bundle-Copyright";
/**
- * Manifest header (named "Bundle-Description") containing a brief
- * description of the bundle's functionality.
+ * Manifest header containing a brief description of the bundle's
+ * functionality.
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
* object returned by the <code>Bundle.getHeaders</code> method.
@@ -84,8 +79,7 @@
public static final String BUNDLE_DESCRIPTION = "Bundle-Description";
/**
- * Manifest header (named "Bundle-Name") identifying the bundle's
- * name.
+ * Manifest header identifying the bundle's name.
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
* object returned by the <code>Bundle.getHeaders</code> method.
@@ -93,9 +87,9 @@
public static final String BUNDLE_NAME = "Bundle-Name";
/**
- * 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.
+ * Manifest header identifying a number of hardware environments and the
+ * native language code libraries that the bundle is carrying for each of
+ * these environments.
*
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
@@ -104,8 +98,8 @@
public static final String BUNDLE_NATIVECODE = "Bundle-NativeCode";
/**
- * Manifest header (named "Export-Package") identifying the
- * packages that the bundle offers to the Framework for export.
+ * Manifest header identifying the packages that the bundle offers to the
+ * Framework for export.
*
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
@@ -114,9 +108,9 @@
public static final String EXPORT_PACKAGE = "Export-Package";
/**
- * Manifest header (named "Export-Service") identifying the fully
- * qualified class names of the services that the bundle may register (used
- * for informational purposes only).
+ * Manifest header identifying the fully qualified class names of the
+ * services that the bundle may register (used for informational purposes
+ * only).
*
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
@@ -127,8 +121,7 @@
public static final String EXPORT_SERVICE = "Export-Service";
/**
- * Manifest header (named "Import-Package") identifying the
- * packages on which the bundle depends.
+ * Manifest header identifying the packages on which the bundle depends.
*
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
@@ -137,8 +130,8 @@
public static final String IMPORT_PACKAGE = "Import-Package";
/**
- * Manifest header (named "DynamicImport-Package") identifying the
- * packages that the bundle may dynamically import during execution.
+ * Manifest header identifying the packages that the bundle may dynamically
+ * import during execution.
*
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
@@ -149,9 +142,8 @@
public static final String DYNAMICIMPORT_PACKAGE = "DynamicImport-Package";
/**
- * Manifest header (named "Import-Service") identifying the fully
- * qualified class names of the services that the bundle requires (used for
- * informational purposes only).
+ * Manifest header identifying the fully qualified class names of the
+ * services that the bundle requires (used for informational purposes only).
*
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
@@ -162,8 +154,7 @@
public static final String IMPORT_SERVICE = "Import-Service";
/**
- * Manifest header (named "Bundle-Vendor") identifying the
- * bundle's vendor.
+ * Manifest header identifying the bundle's vendor.
*
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
@@ -172,8 +163,7 @@
public static final String BUNDLE_VENDOR = "Bundle-Vendor";
/**
- * Manifest header (named "Bundle-Version") identifying the
- * bundle's version.
+ * Manifest header identifying the bundle's version.
*
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
@@ -182,9 +172,8 @@
public static final String BUNDLE_VERSION = "Bundle-Version";
/**
- * Manifest header (named "Bundle-DocURL") identifying the
- * bundle's documentation URL, from which further information about the
- * bundle may be obtained.
+ * Manifest header identifying the bundle's documentation URL, from which
+ * further information about the bundle may be obtained.
*
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
@@ -193,9 +182,8 @@
public static final String BUNDLE_DOCURL = "Bundle-DocURL";
/**
- * Manifest header (named "Bundle-ContactAddress") identifying the
- * contact address where problems with the bundle may be reported; for
- * example, an email address.
+ * Manifest header identifying the contact address where problems with the
+ * bundle may be reported; for example, an email address.
*
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
@@ -204,8 +192,7 @@
public static final String BUNDLE_CONTACTADDRESS = "Bundle-ContactAddress";
/**
- * Manifest header attribute (named "Bundle-Activator")
- * identifying the bundle's activator class.
+ * Manifest header attribute identifying the bundle's activator class.
*
* <p>
* If present, this header specifies the name of the bundle resource class
@@ -220,9 +207,8 @@
public static final String BUNDLE_ACTIVATOR = "Bundle-Activator";
/**
- * Manifest header (named "Bundle-UpdateLocation") identifying the
- * location from which a new bundle version is obtained during a bundle
- * update operation.
+ * Manifest header identifying the location from which a new bundle version
+ * is obtained during a bundle update operation.
*
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
@@ -231,9 +217,8 @@
public static final String BUNDLE_UPDATELOCATION = "Bundle-UpdateLocation";
/**
- * Manifest header attribute (named "specification-version")
- * identifying the version of a package specified in the Export-Package or
- * Import-Package manifest header.
+ * Manifest header attribute identifying the version of a package specified
+ * in the Export-Package or Import-Package manifest header.
*
* @deprecated As of 1.3. This has been replaced by
* {@link #VERSION_ATTRIBUTE}.
@@ -241,9 +226,8 @@
public static final String PACKAGE_SPECIFICATION_VERSION = "specification-version";
/**
- * Manifest header attribute (named "processor") identifying the
- * processor required to run native bundle code specified in the
- * Bundle-NativeCode manifest header).
+ * Manifest header attribute identifying the processor required to run
+ * native bundle code specified in the Bundle-NativeCode manifest header).
*
* <p>
* The attribute value is encoded in the Bundle-NativeCode manifest header
@@ -252,13 +236,15 @@
* <pre>
* Bundle-NativeCode: http.so ; processor=x86 ...
* </pre>
+ *
+ * @see #BUNDLE_NATIVECODE
*/
public static final String BUNDLE_NATIVECODE_PROCESSOR = "processor";
/**
- * Manifest header attribute (named "osname") identifying the
- * operating system required to run native bundle code specified in the
- * Bundle-NativeCode manifest header).
+ * Manifest header attribute identifying the operating system required to
+ * run native bundle code specified in the Bundle-NativeCode manifest
+ * header).
* <p>
* The attribute value is encoded in the Bundle-NativeCode manifest header
* like:
@@ -266,13 +252,15 @@
* <pre>
* Bundle-NativeCode: http.so ; osname=Linux ...
* </pre>
+ *
+ * @see #BUNDLE_NATIVECODE
*/
public static final String BUNDLE_NATIVECODE_OSNAME = "osname";
/**
- * Manifest header attribute (named "osversion") identifying the
- * operating system version required to run native bundle code specified in
- * the Bundle-NativeCode manifest header).
+ * Manifest header attribute identifying the operating system version
+ * required to run native bundle code specified in the Bundle-NativeCode
+ * manifest header).
* <p>
* The attribute value is encoded in the Bundle-NativeCode manifest header
* like:
@@ -280,13 +268,15 @@
* <pre>
* Bundle-NativeCode: http.so ; osversion="2.34" ...
* </pre>
+ *
+ * @see #BUNDLE_NATIVECODE
*/
public static final String BUNDLE_NATIVECODE_OSVERSION = "osversion";
/**
- * 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.
+ * Manifest header attribute identifying the language in which the native
+ * bundle code is written specified in the Bundle-NativeCode manifest
+ * header. See ISO 639 for possible values.
* <p>
* The attribute value is encoded in the Bundle-NativeCode manifest header
* like:
@@ -294,15 +284,16 @@
* <pre>
* Bundle-NativeCode: http.so ; language=nl_be ...
* </pre>
+ *
+ * @see #BUNDLE_NATIVECODE
*/
public static final String BUNDLE_NATIVECODE_LANGUAGE = "language";
/**
- * 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.
+ * Manifest header 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.
*
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
@@ -312,269 +303,10 @@
*/
public static final String BUNDLE_REQUIREDEXECUTIONENVIRONMENT = "Bundle-RequiredExecutionEnvironment";
- /*
- * Framework environment properties.
- */
-
- /**
- * Framework environment property (named
- * "org.osgi.framework.version") identifying the Framework
- * version.
- *
- * <p>
- * The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
- */
- public static final String FRAMEWORK_VERSION = "org.osgi.framework.version";
-
- /**
- * Framework environment property (named
- * "org.osgi.framework.vendor") identifying the Framework
- * implementation vendor.
- *
- * <p>
- * The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
- */
- public static final String FRAMEWORK_VENDOR = "org.osgi.framework.vendor";
-
- /**
- * Framework environment property (named
- * "org.osgi.framework.language") identifying the Framework
- * implementation language (see ISO 639 for possible values).
- *
- * <p>
- * The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
- */
- public static final String FRAMEWORK_LANGUAGE = "org.osgi.framework.language";
-
- /**
- * Framework environment property (named
- * "org.osgi.framework.os.name") identifying the Framework
- * host-computer's operating system.
- *
- * <p>
- * The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
- */
- public static final String FRAMEWORK_OS_NAME = "org.osgi.framework.os.name";
-
- /**
- * Framework environment property (named
- * "org.osgi.framework.os.version") identifying the Framework
- * host-computer's operating system version number.
- *
- * <p>
- * The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
- */
- public static final String FRAMEWORK_OS_VERSION = "org.osgi.framework.os.version";
-
- /**
- * Framework environment property (named
- * "org.osgi.framework.processor") identifying the Framework
- * host-computer's processor name.
- * <p>
- * The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
- */
- public static final String FRAMEWORK_PROCESSOR = "org.osgi.framework.processor";
-
- /**
- * Framework environment property (named
- * "org.osgi.framework.executionenvironment") identifying
- * execution environments provided by the Framework.
- * <p>
- * The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
- *
- * @since 1.2
- */
- public static final String FRAMEWORK_EXECUTIONENVIRONMENT = "org.osgi.framework.executionenvironment";
-
- /**
- * Framework environment property (named
- * "org.osgi.framework.bootdelegation") identifying packages for
- * which the Framework must delegate class loading to the boot class path.
- * <p>
- * The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
- *
- * @since 1.3
- */
- public static final String FRAMEWORK_BOOTDELEGATION = "org.osgi.framework.bootdelegation";
-
- /**
- * Framework environment property (named
- * "org.osgi.framework.system.packages") identifying package which
- * the system bundle must export.
- * <p>
- * The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
- *
- * @since 1.3
- */
- public static final String FRAMEWORK_SYSTEMPACKAGES = "org.osgi.framework.system.packages";
-
- /**
- * 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 <code>true</code>. The Framework
- * must support framework extension bundles.
- * <p>
- * The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
- *
- * @since 1.3
- */
- public static final String SUPPORTS_FRAMEWORK_EXTENSION = "org.osgi.supports.framework.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 <code>true</code>, then the Framework
- * supports bootclasspath extension bundles. The default value is
- * <code>false</code>.
- * <p>
- * The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
- *
- * @since 1.3
- */
- public static final String SUPPORTS_BOOTCLASSPATH_EXTENSION = "org.osgi.supports.bootclasspath.extension";
-
- /**
- * 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 <code>true</code>. The Framework must support
- * fragment bundles.
- * <p>
- * The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
- *
- * @since 1.3
- */
- public static final String SUPPORTS_FRAMEWORK_FRAGMENT = "org.osgi.supports.framework.fragment";
-
- /**
- * Framework environment property (named
- * "org.osgi.supports.framework.requirebundle") identifying
- * whether the Framework supports the <code>Require-Bundle</code> manifest
- * header. As of version 1.4, the value of this property must be
- * <code>true</code>. The Framework must support the
- * <code>Require-Bundle</code> manifest header.
- * <p>
- * The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
- *
- * @since 1.3
- */
- public static final String SUPPORTS_FRAMEWORK_REQUIREBUNDLE = "org.osgi.supports.framework.requirebundle";
-
- /*
- * Service properties.
- */
-
- /**
- * Service property (named "objectClass") identifying all of the
- * class names under which a service was registered in the Framework (of
- * type <code>java.lang.String[]</code>).
- *
- * <p>
- * This property is set by the Framework when a service is registered.
- */
- public static final String OBJECTCLASS = "objectClass";
-
- /**
- * Service property (named "service.id") identifying a service's
- * registration number (of type <code>java.lang.Long</code>).
- *
- * <p>
- * 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.
- */
- public static final String SERVICE_ID = "service.id";
-
- /**
- * Service property (named "service.pid") identifying a service's
- * persistent identifier.
- *
- * <p>
- * This property may be supplied in the <code>properties</code>
- * <code>Dictionary</code>
- * object passed to the <code>BundleContext.registerService</code> method.
- *
- * <p>
- * A service's persistent identifier uniquely identifies the service and
- * persists across multiple Framework invocations.
- *
- * <p>
- * By convention, every bundle has its own unique namespace, starting with
- * the bundle's identifier (see {@link Bundle#getBundleId}) and followed by
- * a dot (.). A bundle may use this as the prefix of the persistent
- * identifiers for the services it registers.
- */
- public static final String SERVICE_PID = "service.pid";
-
- /**
- * Service property (named "service.ranking") identifying a
- * service's ranking number (of type <code>java.lang.Integer</code>).
- *
- * <p>
- * This property may be supplied in the <code>properties
- * Dictionary</code>
- * object passed to the <code>BundleContext.registerService</code> method.
- *
- * <p>
- * The service ranking is used by the Framework to determine the <i>default
- * </i> service to be returned from a call to the
- * {@link BundleContext#getServiceReference} method: If more than one
- * service implements the specified class, the <code>ServiceReference</code>
- * object with the highest ranking is returned.
- *
- * <p>
- * The default ranking is zero (0). A service with a ranking of
- * <code>Integer.MAX_VALUE</code> is very likely to be returned as the
- * default service, whereas a service with a ranking of
- * <code>Integer.MIN_VALUE</code> is very unlikely to be returned.
- *
- * <p>
- * If the supplied property value is not of type
- * <code>java.lang.Integer</code>, it is deemed to have a ranking value
- * of zero.
- */
- public static final String SERVICE_RANKING = "service.ranking";
-
/**
- * Service property (named "service.vendor") identifying a
- * service's vendor.
+ * Manifest header identifying the bundle's symbolic name.
*
* <p>
- * This property may be supplied in the properties <code>Dictionary</code>
- * object passed to the <code>BundleContext.registerService</code> method.
- */
- public static final String SERVICE_VENDOR = "service.vendor";
-
- /**
- * Service property (named "service.description") identifying a
- * service's description.
- *
- * <p>
- * This property may be supplied in the properties <code>Dictionary</code>
- * object passed to the <code>BundleContext.registerService</code> method.
- */
- public static final String SERVICE_DESCRIPTION = "service.description";
-
- /**
- * Manifest header (named "Bundle-SymbolicName") identifying the
- * bundle's symbolic name.
- * <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
* object returned by the <code>Bundle.getHeaders</code> method.
*
@@ -583,8 +315,8 @@
public final static String BUNDLE_SYMBOLICNAME = "Bundle-SymbolicName";
/**
- * Manifest header directive (named "singleton") identifying
- * whether a bundle is a singleton. The default value is <code>false</code>.
+ * Manifest header directive identifying whether a bundle is a singleton.
+ * The default value is <code>false</code>.
*
* <p>
* The directive value is encoded in the Bundle-SymbolicName manifest header
@@ -594,14 +326,19 @@
* Bundle-SymbolicName: com.acme.module.test; singleton:=true
* </pre>
*
+ * <p>
+ * The attribute value may be retrieved from the <code>Dictionary</code>
+ * object returned by the <code>Bundle.getHeaders</code> method.
+ *
+ * @see #BUNDLE_SYMBOLICNAME
* @since 1.3
*/
public final static String SINGLETON_DIRECTIVE = "singleton";
/**
- * Manifest header directive (named "fragment-attachment")
- * identifying if and when a fragment may attach to a host bundle. The
- * default value is <code>"always"</code>.
+ * Manifest header directive identifying if and when a fragment may attach
+ * to a host bundle. The default value is
+ * {@link #FRAGMENT_ATTACHMENT_ALWAYS always}.
*
* <p>
* The directive value is encoded in the Bundle-SymbolicName manifest header
@@ -611,19 +348,19 @@
* Bundle-SymbolicName: com.acme.module.test; fragment-attachment:="never"
* </pre>
*
- * @see Constants#FRAGMENT_ATTACHMENT_ALWAYS
- * @see Constants#FRAGMENT_ATTACHMENT_RESOLVETIME
- * @see Constants#FRAGMENT_ATTACHMENT_NEVER
+ * @see #BUNDLE_SYMBOLICNAME
+ * @see #FRAGMENT_ATTACHMENT_ALWAYS
+ * @see #FRAGMENT_ATTACHMENT_RESOLVETIME
+ * @see #FRAGMENT_ATTACHMENT_NEVER
* @since 1.3
*/
public final static String FRAGMENT_ATTACHMENT_DIRECTIVE = "fragment-attachment";
/**
- * 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).
+ * Manifest header directive value 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).
*
* <p>
* The directive value is encoded in the Bundle-SymbolicName manifest header
@@ -633,17 +370,16 @@
* Bundle-SymbolicName: com.acme.module.test; fragment-attachment:="always"
* </pre>
*
- * @see Constants#FRAGMENT_ATTACHMENT_DIRECTIVE
+ * @see #FRAGMENT_ATTACHMENT_DIRECTIVE
* @since 1.3
*/
public final static String FRAGMENT_ATTACHMENT_ALWAYS = "always";
/**
- * 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.
+ * Manifest header directive value 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.
*
* <p>
* The directive value is encoded in the Bundle-SymbolicName manifest header
@@ -653,16 +389,15 @@
* Bundle-SymbolicName: com.acme.module.test; fragment-attachment:="resolve-time"
* </pre>
*
- * @see Constants#FRAGMENT_ATTACHMENT_DIRECTIVE
+ * @see #FRAGMENT_ATTACHMENT_DIRECTIVE
* @since 1.3
*/
public final static String FRAGMENT_ATTACHMENT_RESOLVETIME = "resolve-time";
/**
- * 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.
+ * Manifest header directive value 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.
*
* <p>
* The directive value is encoded in the Bundle-SymbolicName manifest header
@@ -672,14 +407,15 @@
* Bundle-SymbolicName: com.acme.module.test; fragment-attachment:="never"
* </pre>
*
- * @see Constants#FRAGMENT_ATTACHMENT_DIRECTIVE
+ * @see #FRAGMENT_ATTACHMENT_DIRECTIVE
* @since 1.3
*/
public final static String FRAGMENT_ATTACHMENT_NEVER = "never";
/**
- * Manifest header (named "Bundle-Localization") identifying the
- * base name of the bundle's localization entries.
+ * Manifest header identifying the base name of the bundle's localization
+ * entries.
+ *
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
* object returned by the <code>Bundle.getHeaders</code> method.
@@ -698,8 +434,8 @@
public final static String BUNDLE_LOCALIZATION_DEFAULT_BASENAME = "OSGI-INF/l10n/bundle";
/**
- * Manifest header (named "Require-Bundle") identifying the
- * symbolic names of other bundles required by the bundle.
+ * Manifest header identifying the symbolic names of other bundles required
+ * by the bundle.
*
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
@@ -710,9 +446,10 @@
public final static String REQUIRE_BUNDLE = "Require-Bundle";
/**
- * 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 <code>0.0.0</code>.
+ * Manifest header attribute identifying a range of versions for a bundle
+ * specified in the <code>Require-Bundle</code> or
+ * <code>Fragment-Host</code> manifest headers. The default value is
+ * <code>0.0.0</code>.
*
* <p>
* The attribute value is encoded in the Require-Bundle manifest header
@@ -729,13 +466,14 @@
* specified as a single version means a version range that includes any
* bundle version greater than or equal to the specified version.
*
+ * @see #REQUIRE_BUNDLE
* @since 1.3
*/
public static final String BUNDLE_VERSION_ATTRIBUTE = "bundle-version";
/**
- * Manifest header (named "Fragment-Host") identifying the
- * symbolic name of another bundle for which that the bundle is a fragment.
+ * Manifest header identifying the symbolic name of another bundle for which
+ * that the bundle is a fragment.
*
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
@@ -746,8 +484,8 @@
public final static String FRAGMENT_HOST = "Fragment-Host";
/**
- * Manifest header attribute (named "selection-filter") is used
- * for selection by filtering based upon system properties.
+ * Manifest header attribute is used for selection by filtering based upon
+ * system properties.
*
* <p>
* The attribute value is encoded in manifest headers like:
@@ -756,19 +494,19 @@
* Bundle-NativeCode: libgtk.so; selection-filter="(ws=gtk)"; ...
* </pre>
*
+ * @see #BUNDLE_NATIVECODE
* @since 1.3
*/
public final static String SELECTION_FILTER_ATTRIBUTE = "selection-filter";
/**
- * 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.
+ * Manifest header 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 Release 4,
+ * or later, syntax must specify a bundle manifest version.
* <p>
- * The bundle manifest version defined by OSGi R4 or, more specifically, by
- * V1.3 of the OSGi Framework Specification is "2".
+ * The bundle manifest version defined by OSGi Release 4 or, more
+ * specifically, by version 1.3 of the OSGi Core Specification is "2".
*
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
@@ -779,9 +517,8 @@
public final static String BUNDLE_MANIFESTVERSION = "Bundle-ManifestVersion";
/**
- * Manifest header attribute (named "version") identifying the
- * version of a package specified in the Export-Package or Import-Package
- * manifest header.
+ * Manifest header attribute identifying the version of a package specified
+ * in the Export-Package or Import-Package manifest header.
*
* <p>
* The attribute value is encoded in the Export-Package or Import-Package
@@ -791,14 +528,15 @@
* Import-Package: org.osgi.framework; version="1.1"
* </pre>
*
+ * @see #EXPORT_PACKAGE
+ * @see #IMPORT_PACKAGE
* @since 1.3
*/
public final static String VERSION_ATTRIBUTE = "version";
/**
- * 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.
+ * Manifest header attribute identifying the symbolic name of a bundle that
+ * exports a package specified in the Import-Package manifest header.
*
* <p>
* The attribute value is encoded in the Import-Package manifest header
@@ -808,13 +546,15 @@
* Import-Package: org.osgi.framework; bundle-symbolic-name="com.acme.module.test"
* </pre>
*
+ * @see #IMPORT_PACKAGE
* @since 1.3
*/
public final static String BUNDLE_SYMBOLICNAME_ATTRIBUTE = "bundle-symbolic-name";
/**
- * Manifest header directive (named "resolution") identifying the
- * resolution type in the Import-Package or Require-Bundle manifest header.
+ * Manifest header directive identifying the resolution type in the
+ * Import-Package or Require-Bundle manifest header. The default value is
+ * {@link #RESOLUTION_MANDATORY mandatory}.
*
* <p>
* The directive value is encoded in the Import-Package or Require-Bundle
@@ -825,18 +565,19 @@
* Require-Bundle: com.acme.module.test; resolution:="optional"
* </pre>
*
- * @see Constants#RESOLUTION_MANDATORY
- * @see Constants#RESOLUTION_OPTIONAL
+ * @see #IMPORT_PACKAGE
+ * @see #REQUIRE_BUNDLE
+ * @see #RESOLUTION_MANDATORY
+ * @see #RESOLUTION_OPTIONAL
* @since 1.3
*/
public final static String RESOLUTION_DIRECTIVE = "resolution";
/**
- * 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.
+ * Manifest header directive value 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.
*
* <p>
* The directive value is encoded in the Import-Package or Require-Bundle
@@ -847,18 +588,18 @@
* Require-Bundle: com.acme.module.test; resolution:="manditory"
* </pre>
*
- * @see Constants#RESOLUTION_DIRECTIVE
+ * @see #RESOLUTION_DIRECTIVE
* @since 1.3
*/
public final static String RESOLUTION_MANDATORY = "mandatory";
/**
- * 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.
+ * Manifest header directive value 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.
*
* <p>
* The directive value is encoded in the Import-Package or Require-Bundle
@@ -869,14 +610,14 @@
* Require-Bundle: com.acme.module.test; resolution:="optional"
* </pre>
*
- * @see Constants#RESOLUTION_DIRECTIVE
+ * @see #RESOLUTION_DIRECTIVE
* @since 1.3
*/
public final static String RESOLUTION_OPTIONAL = "optional";
/**
- * Manifest header directive (named "uses") identifying a list of
- * packages that an exported package uses.
+ * Manifest header directive identifying a list of packages that an exported
+ * package uses.
*
* <p>
* The directive value is encoded in the Export-Package manifest header
@@ -886,20 +627,23 @@
* Export-Package: org.osgi.util.tracker; uses:="org.osgi.framework"
* </pre>
*
+ * @see #EXPORT_PACKAGE
* @since 1.3
*/
public final static String USES_DIRECTIVE = "uses";
/**
- * Manifest header directive (named "include").
+ * Manifest header directive identifying a list of classes to include in the
+ * exported package.
+ *
* <p>
- * This directive is used by the Import-Package manifest header to identify
+ * This directive is used by the Export-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
+ * exported. The directive value is encoded in the Export-Package manifest
* header like:
*
* <pre>
- * Import-Package: org.osgi.framework; include:="MyClass*"
+ * Export-Package: org.osgi.framework; include:="MyClass*"
* </pre>
*
* <p>
@@ -912,12 +656,15 @@
* Bundle-ActivationPolicy: lazy; include:="org.osgi.framework"
* </pre>
*
+ * @see #EXPORT_PACKAGE
+ * @see #BUNDLE_ACTIVATIONPOLICY
* @since 1.3
*/
public final static String INCLUDE_DIRECTIVE = "include";
/**
- * Manifest header directive (named "exclude").
+ * Manifest header directive identifying a list of classes to exclude in the
+ * exported package..
* <p>
* 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
@@ -938,14 +685,16 @@
* Bundle-ActivationPolicy: lazy; exclude:="org.osgi.framework"
* </pre>
*
+ * @see #EXPORT_PACKAGE
+ * @see #BUNDLE_ACTIVATIONPOLICY
* @since 1.3
*/
public final static String EXCLUDE_DIRECTIVE = "exclude";
/**
- * 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.
+ * Manifest header directive identifying names of matching attributes which
+ * must be specified by matching Import-Package statements in the
+ * Export-Package manifest header.
*
* <p>
* The directive value is encoded in the Export-Package manifest header
@@ -955,13 +704,15 @@
* Export-Package: org.osgi.framework; mandatory:="bundle-symbolic-name"
* </pre>
*
+ * @see #EXPORT_PACKAGE
* @since 1.3
*/
public final static String MANDATORY_DIRECTIVE = "mandatory";
/**
- * Manifest header directive (named "visibility") identifying the
- * visibility of a reqiured bundle in the Require-Bundle manifest header.
+ * Manifest header directive identifying the visibility of a required bundle
+ * in the Require-Bundle manifest header. The default value is
+ * {@link #VISIBILITY_PRIVATE private}.
*
* <p>
* The directive value is encoded in the Require-Bundle manifest header
@@ -971,17 +722,18 @@
* Require-Bundle: com.acme.module.test; visibility:="reexport"
* </pre>
*
- * @see Constants#VISIBILITY_PRIVATE
- * @see Constants#VISIBILITY_REEXPORT
+ * @see #REQUIRE_BUNDLE
+ * @see #VISIBILITY_PRIVATE
+ * @see #VISIBILITY_REEXPORT
* @since 1.3
*/
public final static String VISIBILITY_DIRECTIVE = "visibility";
/**
- * 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.
+ * Manifest header directive value 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.
*
* <p>
* The directive value is encoded in the Require-Bundle manifest header
@@ -991,17 +743,17 @@
* Require-Bundle: com.acme.module.test; visibility:="private"
* </pre>
*
- * @see Constants#VISIBILITY_DIRECTIVE
+ * @see #VISIBILITY_DIRECTIVE
* @since 1.3
*/
public final static String VISIBILITY_PRIVATE = "private";
/**
- * 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.
+ * Manifest header directive value 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.
*
* <p>
* The directive value is encoded in the Require-Bundle manifest header
@@ -1011,13 +763,13 @@
* Require-Bundle: com.acme.module.test; visibility:="reexport"
* </pre>
*
- * @see Constants#VISIBILITY_DIRECTIVE
+ * @see #VISIBILITY_DIRECTIVE
* @since 1.3
*/
public final static String VISIBILITY_REEXPORT = "reexport";
+
/**
- * Manifest header directive (named "extension") identifying the
- * type of the extension fragment.
+ * Manifest header directive identifying the type of the extension fragment.
*
* <p>
* The directive value is encoded in the Fragment-Host manifest header like:
@@ -1026,17 +778,17 @@
* Fragment-Host: system.bundle; extension:="framework"
* </pre>
*
- * @see Constants#EXTENSION_FRAMEWORK
- * @see Constants#EXTENSION_BOOTCLASSPATH
+ * @see #FRAGMENT_HOST
+ * @see #EXTENSION_FRAMEWORK
+ * @see #EXTENSION_BOOTCLASSPATH
* @since 1.3
*/
public final static String EXTENSION_DIRECTIVE = "extension";
/**
- * 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.
+ * Manifest header directive value 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.
*
* <p>
* The directive value is encoded in the Fragment-Host manifest header like:
@@ -1045,16 +797,15 @@
* Fragment-Host: system.bundle; extension:="framework"
* </pre>
*
- * @see Constants#EXTENSION_DIRECTIVE
+ * @see #EXTENSION_DIRECTIVE
* @since 1.3
*/
public final static String EXTENSION_FRAMEWORK = "framework";
/**
- * 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.
+ * Manifest header directive value 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.
*
* <p>
* The directive value is encoded in the Fragment-Host manifest header like:
@@ -1063,34 +814,33 @@
* Fragment-Host: system.bundle; extension:="bootclasspath"
* </pre>
*
- * @see Constants#EXTENSION_DIRECTIVE
+ * @see #EXTENSION_DIRECTIVE
* @since 1.3
*/
public final static String EXTENSION_BOOTCLASSPATH = "bootclasspath";
/**
- * Manifest header (named "Bundle-ActivationPolicy") identifying
- * the bundle's activation policy.
+ * Manifest header identifying the bundle's activation policy.
* <p>
* The attribute value may be retrieved from the <code>Dictionary</code>
* object returned by the <code>Bundle.getHeaders</code> method.
*
* @since 1.4
- * @see Constants#ACTIVATION_LAZY
- * @see Constants#INCLUDE_DIRECTIVE
- * @see Constants#EXCLUDE_DIRECTIVE
+ * @see #ACTIVATION_LAZY
+ * @see #INCLUDE_DIRECTIVE
+ * @see #EXCLUDE_DIRECTIVE
*/
public final static String BUNDLE_ACTIVATIONPOLICY = "Bundle-ActivationPolicy";
/**
- * Bundle activation policy (named "lazy") declaring the bundle
- * must be activated when the first class load is made from the bundle.
+ * Bundle activation policy declaring the bundle must be activated when the
+ * first class load is made from the bundle.
* <p>
* A bundle with the lazy activation policy that is started with the
* {@link Bundle#START_ACTIVATION_POLICY START_ACTIVATION_POLICY} option
* will wait in the {@link Bundle#STARTING 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.
+ * before the class is returned to the requester.
* <p>
* The activation policy value is specified as in the
* Bundle-ActivationPolicy manifest header like:
@@ -1099,11 +849,464 @@
* Bundle-ActivationPolicy: lazy
* </pre>
*
- * @see Constants#BUNDLE_ACTIVATIONPOLICY
+ * @see #BUNDLE_ACTIVATIONPOLICY
* @see Bundle#start(int)
* @see Bundle#START_ACTIVATION_POLICY
* @since 1.4
*/
public final static String ACTIVATION_LAZY = "lazy";
-}
\ No newline at end of file
+ /**
+ * Framework environment property identifying the Framework version.
+ *
+ * <p>
+ * The value of this property may be retrieved by calling the
+ * <code>BundleContext.getProperty</code> method.
+ */
+ public static final String FRAMEWORK_VERSION = "org.osgi.framework.version";
+
+ /**
+ * Framework environment property identifying the Framework implementation
+ * vendor.
+ *
+ * <p>
+ * The value of this property may be retrieved by calling the
+ * <code>BundleContext.getProperty</code> method.
+ */
+ public static final String FRAMEWORK_VENDOR = "org.osgi.framework.vendor";
+
+ /**
+ * Framework environment property identifying the Framework implementation
+ * language (see ISO 639 for possible values).
+ *
+ * <p>
+ * The value of this property may be retrieved by calling the
+ * <code>BundleContext.getProperty</code> method.
+ */
+ public static final String FRAMEWORK_LANGUAGE = "org.osgi.framework.language";
+
+ /**
+ * Framework environment property identifying the Framework host-computer's
+ * operating system.
+ *
+ * <p>
+ * The value of this property may be retrieved by calling the
+ * <code>BundleContext.getProperty</code> method.
+ */
+ public static final String FRAMEWORK_OS_NAME = "org.osgi.framework.os.name";
+
+ /**
+ * Framework environment property identifying the Framework host-computer's
+ * operating system version number.
+ *
+ * <p>
+ * The value of this property may be retrieved by calling the
+ * <code>BundleContext.getProperty</code> method.
+ */
+ public static final String FRAMEWORK_OS_VERSION = "org.osgi.framework.os.version";
+
+ /**
+ * Framework environment property identifying the Framework host-computer's
+ * processor name.
+ *
+ * <p>
+ * The value of this property may be retrieved by calling the
+ * <code>BundleContext.getProperty</code> method.
+ */
+ public static final String FRAMEWORK_PROCESSOR = "org.osgi.framework.processor";
+
+ /**
+ * Framework environment property identifying execution environments
+ * provided by the Framework.
+ *
+ * <p>
+ * The value of this property may be retrieved by calling the
+ * <code>BundleContext.getProperty</code> method.
+ *
+ * @since 1.2
+ */
+ public static final String FRAMEWORK_EXECUTIONENVIRONMENT = "org.osgi.framework.executionenvironment";
+
+ /**
+ * Framework environment property identifying packages for which the
+ * Framework must delegate class loading to the parent class loader of the
+ * bundle.
+ *
+ * <p>
+ * The value of this property may be retrieved by calling the
+ * <code>BundleContext.getProperty</code> method.
+ *
+ * @see #FRAMEWORK_BUNDLE_PARENT
+ * @since 1.3
+ */
+ public static final String FRAMEWORK_BOOTDELEGATION = "org.osgi.framework.bootdelegation";
+
+ /**
+ * Framework environment property identifying packages which the system
+ * bundle must export.
+ *
+ * <p>
+ * If this property is not specified then the framework must calculate a
+ * reasonable default value for the current execution environment.
+ *
+ * <p>
+ * The value of this property may be retrieved by calling the
+ * <code>BundleContext.getProperty</code> method.
+ *
+ * @since 1.3
+ */
+ public static final String FRAMEWORK_SYSTEMPACKAGES = "org.osgi.framework.system.packages";
+
+ /**
+ * Framework environment property identifying extra packages which the
+ * system bundle must export from the current execution environment.
+ *
+ * <p>
+ * This property is useful for configuring extra system packages in addition
+ * to the system packages calculated by the framework.
+ *
+ * <p>
+ * The value of this property may be retrieved by calling the
+ * <code>BundleContext.getProperty</code> method.
+ *
+ * @see #FRAMEWORK_SYSTEMPACKAGES
+ * @since 1.5
+ */
+ public static final String FRAMEWORK_SYSTEMPACKAGES_EXTRA = "org.osgi.framework.system.packages.extra";
+
+ /**
+ * Framework environment property identifying whether the Framework supports
+ * framework extension bundles.
+ *
+ * <p>
+ * As of version 1.4, the value of this property must be <code>true</code>.
+ * The Framework must support framework extension bundles.
+ *
+ * <p>
+ * The value of this property may be retrieved by calling the
+ * <code>BundleContext.getProperty</code> method.
+ *
+ * @since 1.3
+ */
+ public static final String SUPPORTS_FRAMEWORK_EXTENSION = "org.osgi.supports.framework.extension";
+
+ /**
+ * Framework environment property identifying whether the Framework supports
+ * bootclasspath extension bundles.
+ *
+ * <p>
+ * If the value of this property is <code>true</code>, then the Framework
+ * supports bootclasspath extension bundles. The default value is
+ * <code>false</code>.
+ * <p>
+ * The value of this property may be retrieved by calling the
+ * <code>BundleContext.getProperty</code> method.
+ *
+ * @since 1.3
+ */
+ public static final String SUPPORTS_BOOTCLASSPATH_EXTENSION = "org.osgi.supports.bootclasspath.extension";
+
+ /**
+ * Framework environment property identifying whether the Framework supports
+ * fragment bundles.
+ *
+ * <p>
+ * As of version 1.4, the value of this property must be <code>true</code>.
+ * The Framework must support fragment bundles.
+ * <p>
+ * The value of this property may be retrieved by calling the
+ * <code>BundleContext.getProperty</code> method.
+ *
+ * @since 1.3
+ */
+ public static final String SUPPORTS_FRAMEWORK_FRAGMENT = "org.osgi.supports.framework.fragment";
+
+ /**
+ * Framework environment property identifying whether the Framework supports
+ * the {@link #REQUIRE_BUNDLE Require-Bundle} manifest header.
+ *
+ * <p>
+ * As of version 1.4, the value of this property must be <code>true</code>.
+ * The Framework must support the <code>Require-Bundle</code> manifest
+ * header.
+ * <p>
+ * The value of this property may be retrieved by calling the
+ * <code>BundleContext.getProperty</code> method.
+ *
+ * @since 1.3
+ */
+ public static final String SUPPORTS_FRAMEWORK_REQUIREBUNDLE = "org.osgi.supports.framework.requirebundle";
+
+ /**
+ * Specifies the type of security manager the framework must use. If not
+ * specified then the framework will not set the VM security manager.
+ *
+ * @see #FRAMEWORK_SECURITY_OSGI
+ * @since 1.5
+ */
+ public final static String FRAMEWORK_SECURITY = "org.osgi.framework.security";
+
+ /**
+ * Specifies that a security manager that supports all security aspects of
+ * the OSGi core specification including postponed conditions must be
+ * installed.
+ *
+ * <p>
+ * If this value is specified and there is a security manager already
+ * installed, then a <code>SecurityException</code> must be thrown when the
+ * Framework is initialized.
+ *
+ * @see #FRAMEWORK_SECURITY
+ * @since 1.5
+ */
+ public final static String FRAMEWORK_SECURITY_OSGI = "osgi";
+
+ /**
+ * Specified the persistent storage area used by the framework. The value of
+ * this property must be a valid file path in the file system to a
+ * directory. If the specified directory does not exist then the framework
+ * will create the directory. If the specified path exists but is not a
+ * directory or if the framework fails to create the storage directory, then
+ * framework initialization must fail. The framework is free to use this
+ * directory as it sees fit. This area can not be shared with anything else.
+ * <p>
+ * If this property is not set, the framework should use a reasonable
+ * platform default for the persistent storage area.
+ *
+ * @since 1.5
+ */
+ public final static String FRAMEWORK_STORAGE = "org.osgi.framework.storage";
+
+ /**
+ * Specifies if and when the persistent storage area for the framework
+ * should be cleaned. If this property is not set, then the framework
+ * storage area must not be cleaned.
+ *
+ * @see #FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT
+ * @since 1.5
+ */
+ public final static String FRAMEWORK_STORAGE_CLEAN = "org.osgi.framework.storage.clean";
+
+ /**
+ * Specifies that the framework storage area must be cleaned before the
+ * framework is initialized for the first time. Subsequent inits, starts or
+ * updates of the framework will not result in cleaning the framework
+ * storage area.
+ *
+ * @since 1.5
+ */
+ public final static String FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT = "onFirstInit";
+
+ /**
+ * Specifies a comma separated list of additional library file extensions
+ * that must be used when a bundle's class loader is searching for native
+ * libraries. If this property is not set, then only the library name
+ * returned by <code>System.mapLibraryName(String)</code> will be used to
+ * search. This is needed for certain operating systems which allow more
+ * than one extension for a library. For example, AIX allows library
+ * extensions of <code>.a</code> and <code>.so</code>, but
+ * <code>System.mapLibraryName(String)</code> will only return names with
+ * the <code>.a</code> extension.
+ *
+ * @since 1.5
+ */
+ public final static String FRAMEWORK_LIBRARY_EXTENSIONS = "org.osgi.framework.library.extensions";
+
+ /**
+ * Specifies an optional OS specific command to set file permissions on
+ * extracted native code. On some operating systems, it is required that
+ * native libraries be set to executable. This optional property allows you
+ * to specify the command. For example, on a UNIX style OS, this property
+ * could have the following value.
+ *
+ * <pre>
+ * chmod +rx ${abspath}
+ * </pre>
+ *
+ * The <code>${abspath}</code> is used by the framework to substitute the
+ * actual absolute file path.
+ *
+ * @since 1.5
+ */
+ public final static String FRAMEWORK_EXECPERMISSION = "org.osgi.framework.command.execpermission";
+
+ /**
+ * Specifies the trust repositories used by the framework. The value is a
+ * <code>java.io.File.pathSeparator</code> separated list of valid file
+ * paths to files that contain key stores of type <code>JKS</code>. The
+ * framework will use the key stores as trust repositories to authenticate
+ * certificates of trusted signers. The key stores are only used as
+ * read-only trust repositories to access public keys. No passwords are
+ * required to access the key stores' public keys.
+ * <p>
+ * Note that framework implementations are allowed to use other trust
+ * repositories in addition to the trust repositories specified by this
+ * property. How these other trust repositories are configured and populated
+ * is implementation specific.
+ *
+ * @since 1.5
+ */
+ public final static String FRAMEWORK_TRUST_REPOSITORIES = "org.osgi.framework.trust.repositories";
+
+ /**
+ * Specifies the current windowing system. The framework should provide a
+ * reasonable default if this is not set.
+ *
+ * @since 1.5
+ */
+ public final static String FRAMEWORK_WINDOWSYSTEM = "org.osgi.framework.windowsystem";
+
+ /**
+ * Specifies the beginning start level of the framework.
+ *
+ * @see "Core Specification, section 8.2.3."
+ * @since 1.5
+ */
+ public final static String FRAMEWORK_BEGINNING_STARTLEVEL = "org.osgi.framework.startlevel.beginning";
+
+ /**
+ * Specifies the parent class loader type for all bundle class loaders.
+ * Default value is {@link #FRAMEWORK_BUNDLE_PARENT_BOOT boot}.
+ *
+ * @see #FRAMEWORK_BUNDLE_PARENT_BOOT
+ * @see #FRAMEWORK_BUNDLE_PARENT_EXT
+ * @see #FRAMEWORK_BUNDLE_PARENT_APP
+ * @see #FRAMEWORK_BUNDLE_PARENT_FRAMEWORK
+ * @since 1.5
+ */
+ public final static String FRAMEWORK_BUNDLE_PARENT = "org.osgi.framework.bundle.parent";
+
+ /**
+ * Specifies to use of the boot class loader as the parent class loader for
+ * all bundle class loaders.
+ *
+ * @since 1.5
+ * @see #FRAMEWORK_BUNDLE_PARENT
+ */
+ public final static String FRAMEWORK_BUNDLE_PARENT_BOOT = "boot";
+
+ /**
+ * Specifies to use the extension class loader as the parent class loader
+ * for all bundle class loaders.
+ *
+ * @since 1.5
+ * @see #FRAMEWORK_BUNDLE_PARENT
+ */
+ public final static String FRAMEWORK_BUNDLE_PARENT_EXT = "ext";
+
+ /**
+ * Specifies to use the application class loader as the parent class loader
+ * for all bundle class loaders. Depending on how the framework is
+ * launched, this may refer to the same class loader as
+ * {@link #FRAMEWORK_BUNDLE_PARENT_FRAMEWORK}.
+ *
+ * @since 1.5
+ * @see #FRAMEWORK_BUNDLE_PARENT
+ */
+ public final static String FRAMEWORK_BUNDLE_PARENT_APP = "app";
+
+ /**
+ * Specifies to use the framework class loader as the parent class loader
+ * for all bundle class loaders. The framework class loader is the class
+ * loader used to load the framework implementation. Depending on how the
+ * framework is launched, this may refer to the same class loader as
+ * {@link #FRAMEWORK_BUNDLE_PARENT_APP}.
+ *
+ * @since 1.5
+ * @see #FRAMEWORK_BUNDLE_PARENT
+ */
+ public final static String FRAMEWORK_BUNDLE_PARENT_FRAMEWORK = "framework";
+
+ /*
+ * Service properties.
+ */
+
+ /**
+ * Service property identifying all of the class names under which a service
+ * was registered in the Framework. The value of this property must be of
+ * type <code>String[]</code>.
+ *
+ * <p>
+ * This property is set by the Framework when a service is registered.
+ */
+ public static final String OBJECTCLASS = "objectClass";
+
+ /**
+ * Service property identifying a service's registration number. The value
+ * of this property must be of type <code>Long</code>.
+ *
+ * <p>
+ * 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.
+ */
+ public static final String SERVICE_ID = "service.id";
+
+ /**
+ * Service property identifying a service's persistent identifier.
+ *
+ * <p>
+ * This property may be supplied in the <code>properties</code>
+ * <code>Dictionary</code> object passed to the
+ * <code>BundleContext.registerService</code> method. The value of this
+ * property must be of type <code>String</code>, <code>String[]</code>, or
+ * <code>Collection</code> of <code>String</code>.
+ *
+ * <p>
+ * A service's persistent identifier uniquely identifies the service and
+ * persists across multiple Framework invocations.
+ *
+ * <p>
+ * By convention, every bundle has its own unique namespace, starting with
+ * the bundle's identifier (see {@link Bundle#getBundleId}) and followed by
+ * a dot (.). A bundle may use this as the prefix of the persistent
+ * identifiers for the services it registers.
+ */
+ public static final String SERVICE_PID = "service.pid";
+
+ /**
+ * Service property identifying a service's ranking number.
+ *
+ * <p>
+ * This property may be supplied in the <code>properties
+ * Dictionary</code> object passed to the
+ * <code>BundleContext.registerService</code> method. The value of this
+ * property must be of type <code>Integer</code>.
+ *
+ * <p>
+ * The service ranking is used by the Framework to determine the <i>natural
+ * order</i> of services, see {@link ServiceReference#compareTo(Object)},
+ * and the <i>default</i> service to be returned from a call to the
+ * {@link BundleContext#getServiceReference} method.
+ *
+ * <p>
+ * The default ranking is zero (0). A service with a ranking of
+ * <code>Integer.MAX_VALUE</code> is very likely to be returned as the
+ * default service, whereas a service with a ranking of
+ * <code>Integer.MIN_VALUE</code> is very unlikely to be returned.
+ *
+ * <p>
+ * If the supplied property value is not of type <code>Integer</code>, it is
+ * deemed to have a ranking value of zero.
+ */
+ public static final String SERVICE_RANKING = "service.ranking";
+
+ /**
+ * Service property identifying a service's vendor.
+ *
+ * <p>
+ * This property may be supplied in the properties <code>Dictionary</code>
+ * object passed to the <code>BundleContext.registerService</code> method.
+ */
+ public static final String SERVICE_VENDOR = "service.vendor";
+
+ /**
+ * Service property identifying a service's description.
+ *
+ * <p>
+ * This property may be supplied in the properties <code>Dictionary</code>
+ * object passed to the <code>BundleContext.registerService</code> method.
+ */
+ public static final String SERVICE_DESCRIPTION = "service.description";
+}
Modified: felix/trunk/org.osgi.core/src/main/java/org/osgi/framework/Filter.java
URL: http://svn.apache.org/viewvc/felix/trunk/org.osgi.core/src/main/java/org/osgi/framework/Filter.java?rev=782737&r1=782736&r2=782737&view=diff
==============================================================================
--- felix/trunk/org.osgi.core/src/main/java/org/osgi/framework/Filter.java (original)
+++ felix/trunk/org.osgi.core/src/main/java/org/osgi/framework/Filter.java Mon Jun 8 19:31:06 2009
@@ -1,7 +1,5 @@
/*
- * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/Filter.java,v 1.16 2007/02/21 16:49:05 hargrave Exp $
- *
- * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2009). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,12 +20,13 @@
/**
* An RFC 1960-based Filter.
* <p>
- * <code>Filter</code> objects can be created by calling
- * {@link BundleContext#createFilter} with the chosen filter string.
+ * <code>Filter</code>s can be created by calling
+ * {@link BundleContext#createFilter} or {@link FrameworkUtil#createFilter} with
+ * a filter string.
* <p>
- * A <code>Filter</code> object can be used numerous times to determine if the
- * match argument matches the filter string that was used to create the
- * <code>Filter</code> object.
+ * A <code>Filter</code> can be used numerous times to determine if the match
+ * argument matches the filter string that was used to create the
+ * <code>Filter</code>.
* <p>
* Some examples of LDAP filters are:
*
@@ -39,86 +38,85 @@
* </pre>
*
* @since 1.1
- * @see "Core Specification, section 5.5, for a description of the filter string
- * syntax."
+ * @see "Core Specification, section 5.5, for a description of the filter string syntax."
* @ThreadSafe
- * @version $Revision: 1.16 $
+ * @version $Revision: 6860 $
*/
public interface Filter {
/**
* Filter using a service's properties.
* <p>
- * The filter is executed using the keys and values of the referenced
- * service's properties. The keys are case insensitively matched with the
- * filter.
+ * This <code>Filter</code> is executed using the keys and values of the
+ * referenced service's properties. The keys are case insensitively matched
+ * with this <code>Filter</code>.
*
* @param reference The reference to the service whose properties are used
* in the match.
- *
* @return <code>true</code> if the service's properties match this
- * filter; <code>false</code> otherwise.
+ * <code>Filter</code>; <code>false</code> otherwise.
*/
public boolean match(ServiceReference reference);
/**
- * Filter using a <code>Dictionary</code> object. The Filter is executed
- * using the <code>Dictionary</code> object's keys and values. The keys
- * are case insensitively matched with the filter.
- *
- * @param dictionary The <code>Dictionary</code> object whose keys are
- * used in the match.
- *
- * @return <code>true</code> if the <code>Dictionary</code> object's
- * keys and values match this filter; <code>false</code>
- * otherwise.
- *
- * @throws IllegalArgumentException If <code>dictionary</code> contains
- * case variants of the same key name.
+ * Filter using a <code>Dictionary</code>. This <code>Filter</code> is
+ * executed using the specified <code>Dictionary</code>'s keys and values.
+ * The keys are case insensitively matched with this <code>Filter</code>.
+ *
+ * @param dictionary The <code>Dictionary</code> whose keys are used in the
+ * match.
+ * @return <code>true</code> if the <code>Dictionary</code>'s keys and
+ * values match this filter; <code>false</code> otherwise.
+ * @throws IllegalArgumentException If <code>dictionary</code> contains case
+ * variants of the same key name.
*/
public boolean match(Dictionary dictionary);
/**
- * Returns this <code>Filter</code> object's filter string.
+ * Returns this <code>Filter</code>'s filter string.
* <p>
* The filter string is normalized by removing whitespace which does not
* affect the meaning of the filter.
*
- * @return Filter string.
+ * @return This <code>Filter</code>'s filter string.
*/
public String toString();
/**
- * Compares this <code>Filter</code> object to another object.
+ * Compares this <code>Filter</code> to another <code>Filter</code>.
*
- * @param obj The object to compare against this <code>Filter</code>
- * object.
+ * <p>
+ * This method returns the result of calling
+ * <code>this.toString().equals(obj.toString())</code>.
*
- * @return If the other object is a <code>Filter</code> object, then
- * returns <code>this.toString().equals(obj.toString()</code>;<code>false</code>
- * otherwise.
+ * @param obj The object to compare against this <code>Filter</code>.
+ * @return If the other object is a <code>Filter</code> object, then returns
+ * the result of calling
+ * <code>this.toString().equals(obj.toString())</code>;
+ * <code>false</code> otherwise.
*/
public boolean equals(Object obj);
/**
- * Returns the hashCode for this <code>Filter</code> object.
+ * Returns the hashCode for this <code>Filter</code>.
*
- * @return The hashCode of the filter string; that is,
- * <code>this.toString().hashCode()</code>.
+ * <p>
+ * This method returns the result of calling
+ * <code>this.toString().hashCode()</code>.
+ *
+ * @return The hashCode of this <code>Filter</code>.
*/
public int hashCode();
/**
- * Filter with case sensitivity using a <code>Dictionary</code> object.
- * The Filter is executed using the <code>Dictionary</code> object's keys
- * and values. The keys are case sensitively matched with the filter.
- *
- * @param dictionary The <code>Dictionary</code> object whose keys are
- * used in the match.
- *
- * @return <code>true</code> if the <code>Dictionary</code> object's
- * keys and values match this filter; <code>false</code>
- * otherwise.
- *
+ * Filter with case sensitivity using a <code>Dictionary</code>. This
+ * <code>Filter</code> is executed using the specified
+ * <code>Dictionary</code>'s keys and values. The keys are case sensitively
+ * matched with this <code>Filter</code>.
+ *
+ * @param dictionary The <code>Dictionary</code> whose keys are used in the
+ * match.
+ * @return <code>true</code> if the <code>Dictionary</code>'s keys and
+ * values match this filter; <code>false</code> otherwise.
* @since 1.3
*/
public boolean matchCase(Dictionary dictionary);
Modified: felix/trunk/org.osgi.core/src/main/java/org/osgi/framework/FrameworkEvent.java
URL: http://svn.apache.org/viewvc/felix/trunk/org.osgi.core/src/main/java/org/osgi/framework/FrameworkEvent.java?rev=782737&r1=782736&r2=782737&view=diff
==============================================================================
--- felix/trunk/org.osgi.core/src/main/java/org/osgi/framework/FrameworkEvent.java (original)
+++ felix/trunk/org.osgi.core/src/main/java/org/osgi/framework/FrameworkEvent.java Mon Jun 8 19:31:06 2009
@@ -1,7 +1,5 @@
/*
- * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/FrameworkEvent.java,v 1.15 2007/02/20 00:14:12 hargrave Exp $
- *
- * Copyright (c) OSGi Alliance (2004, 2007). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2009). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,8 +23,8 @@
*
* <p>
* <code>FrameworkEvent</code> objects are delivered to
- * <code>FrameworkListener</code>s when a general event occurs within the
- * OSGi environment. A type code is used to identify the event type for future
+ * <code>FrameworkListener</code>s when a general event occurs within the OSGi
+ * environment. A type code is used to identify the event type for future
* extendability.
*
* <p>
@@ -34,11 +32,11 @@
*
* @Immutable
* @see FrameworkListener
- * @version $Revision: 1.15 $
+ * @version $Revision: 6542 $
*/
public class FrameworkEvent extends EventObject {
- static final long serialVersionUID = 207051004521261705L;
+ static final long serialVersionUID = 207051004521261705L;
/**
* Bundle related to the event.
*/
@@ -60,25 +58,20 @@
* <p>
* This event is fired when the Framework has started after all installed
* bundles that are marked to be started have been started and the Framework
- * has reached the intitial start level.
- *
- * <p>
- * The value of <code>STARTED</code> is 0x00000001.
+ * has reached the initial start level. The source of this event is the
+ * System Bundle.
*
- * @see "<code>StartLevel</code>"
+ * @see "The Start Level Service"
*/
- public final static int STARTED = 0x00000001;
+ public final static int STARTED = 0x00000001;
/**
* An error has occurred.
*
* <p>
* There was an error associated with a bundle.
- *
- * <p>
- * The value of <code>ERROR</code> is 0x00000002.
*/
- public final static int ERROR = 0x00000002;
+ public final static int ERROR = 0x00000002;
/**
* A PackageAdmin.refreshPackage operation has completed.
@@ -86,14 +79,12 @@
* <p>
* This event is fired when the Framework has completed the refresh packages
* operation initiated by a call to the PackageAdmin.refreshPackages method.
- *
- * <p>
- * The value of <code>PACKAGES_REFRESHED</code> is 0x00000004.
+ * The source of this event is the System Bundle.
*
* @since 1.2
* @see "<code>PackageAdmin.refreshPackages</code>"
*/
- public final static int PACKAGES_REFRESHED = 0x00000004;
+ public final static int PACKAGES_REFRESHED = 0x00000004;
/**
* A StartLevel.setStartLevel operation has completed.
@@ -101,14 +92,12 @@
* <p>
* This event is fired when the Framework has completed changing the active
* start level initiated by a call to the StartLevel.setStartLevel method.
- *
- * <p>
- * The value of <code>STARTLEVEL_CHANGED</code> is 0x00000008.
+ * The source of this event is the System Bundle.
*
* @since 1.2
- * @see "<code>StartLevel</code>"
+ * @see "The Start Level Service"
*/
- public final static int STARTLEVEL_CHANGED = 0x00000008;
+ public final static int STARTLEVEL_CHANGED = 0x00000008;
/**
* A warning has occurred.
@@ -116,12 +105,9 @@
* <p>
* There was a warning associated with a bundle.
*
- * <p>
- * The value of <code>WARNING</code> is 0x00000010.
- *
* @since 1.3
*/
- public final static int WARNING = 0x00000010;
+ public final static int WARNING = 0x00000010;
/**
* An informational event has occurred.
@@ -129,12 +115,56 @@
* <p>
* There was an informational event associated with a bundle.
*
+ * @since 1.3
+ */
+ public final static int INFO = 0x00000020;
+
+ /**
+ * The Framework has stopped.
+ *
* <p>
- * The value of <code>INFO</code> is 0x00000020.
+ * This event is fired when the Framework has been stopped because of a stop
+ * operation on the system bundle. The source of this event is the System
+ * Bundle.
*
- * @since 1.3
+ * @since 1.5
+ */
+ public final static int STOPPED = 0x00000040;
+
+ /**
+ * The Framework has stopped during update.
+ *
+ * <p>
+ * This event is fired when the Framework has been stopped because of an
+ * update operation on the system bundle. The Framework will be restarted
+ * after this event is fired. The source of this event is the System Bundle.
+ *
+ * @since 1.5
+ */
+ public final static int STOPPED_UPDATE = 0x00000080;
+
+ /**
+ * The Framework has stopped and the boot class path has changed.
+ *
+ * <p>
+ * This event is fired when the Framework has been stopped because of a stop
+ * operation on the system bundle and a bootclasspath extension bundle has
+ * been installed or updated. The source of this event is the System Bundle.
+ *
+ * @since 1.5
+ */
+ public final static int STOPPED_BOOTCLASSPATH_MODIFIED = 0x00000100;
+
+ /**
+ * The Framework did not stop before the wait timeout expired.
+ *
+ * <p>
+ * This event is fired when the Framework did not stop before the wait
+ * timeout expired. The source of this event is the System Bundle.
+ *
+ * @since 1.5
*/
- public final static int INFO = 0x00000020;
+ public final static int WAIT_TIMEDOUT = 0x00000200;
/**
* Creates a Framework event.
@@ -197,6 +227,10 @@
* <li>{@link #INFO}
* <li>{@link #PACKAGES_REFRESHED}
* <li>{@link #STARTLEVEL_CHANGED}
+ * <li>{@link #STOPPED}
+ * <li>{@link #STOPPED_BOOTCLASSPATH_MODIFIED}
+ * <li>{@link #STOPPED_UPDATE}
+ * <li>{@link #WAIT_TIMEDOUT}
* </ul>
*
* @return The type of state change.
Modified: felix/trunk/org.osgi.core/src/main/java/org/osgi/framework/FrameworkListener.java
URL: http://svn.apache.org/viewvc/felix/trunk/org.osgi.core/src/main/java/org/osgi/framework/FrameworkListener.java?rev=782737&r1=782736&r2=782737&view=diff
==============================================================================
--- felix/trunk/org.osgi.core/src/main/java/org/osgi/framework/FrameworkListener.java (original)
+++ felix/trunk/org.osgi.core/src/main/java/org/osgi/framework/FrameworkListener.java Mon Jun 8 19:31:06 2009
@@ -1,7 +1,5 @@
/*
- * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/FrameworkListener.java,v 1.12 2007/02/21 16:49:05 hargrave Exp $
- *
- * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2008). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,7 +35,7 @@
*
* @see FrameworkEvent
* @NotThreadSafe
- * @version $Revision: 1.12 $
+ * @version $Revision: 5673 $
*/
public interface FrameworkListener extends EventListener {