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 2011/05/17 23:20:35 UTC
svn commit: r1104564 [10/12] - in /felix/trunk/framework: ./
src/main/java/org/apache/felix/framework/
src/main/java/org/apache/felix/framework/cache/
src/main/java/org/apache/felix/framework/capabilityset/
src/main/java/org/apache/felix/framework/reso...
Modified: felix/trunk/framework/src/main/java/org/osgi/framework/BundleReference.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/osgi/framework/BundleReference.java?rev=1104564&r1=1104563&r2=1104564&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/framework/BundleReference.java (original)
+++ felix/trunk/framework/src/main/java/org/osgi/framework/BundleReference.java Tue May 17 21:20:32 2011
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2009, 2010). 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.
@@ -21,15 +21,16 @@ package org.osgi.framework;
*
* @since 1.5
* @ThreadSafe
- * @version $Revision: 6860 $
+ * @noimplement
+ * @version $Id: e61bd3e020264b04022a430fe09a85ee3aabf1a3 $
*/
public interface BundleReference {
/**
- * Returns the <code>Bundle</code> object associated with this
- * <code>BundleReference</code>.
+ * Returns the {@code Bundle} object associated with this
+ * {@code BundleReference}.
*
- * @return The <code>Bundle</code> object associated with this
- * <code>BundleReference</code>.
+ * @return The {@code Bundle} object associated with this
+ * {@code BundleReference}.
*/
public Bundle getBundle();
}
Modified: felix/trunk/framework/src/main/java/org/osgi/framework/Configurable.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/osgi/framework/Configurable.java?rev=1104564&r1=1104563&r2=1104564&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/framework/Configurable.java (original)
+++ felix/trunk/framework/src/main/java/org/osgi/framework/Configurable.java Tue May 17 21:20:32 2011
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2010). 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.
@@ -20,20 +20,20 @@ package org.osgi.framework;
* Supports a configuration object.
*
* <p>
- * <code>Configurable</code> is an interface that should be used by a bundle
+ * {@code Configurable} is an interface that should be used by a bundle
* developer in support of a configurable service. Bundles that need to
* configure a service may test to determine if the service object is an
- * <code>instanceof Configurable</code>.
+ * {@code instanceof Configurable}.
*
* @deprecated As of 1.2. Please use Configuration Admin service.
- * @version $Revision: 6361 $
+ * @version $Id: 29705c0c238aa456cda1b1a13458079bf1542771 $
*/
public interface Configurable {
/**
* Returns this service's configuration object.
*
* <p>
- * Services implementing <code>Configurable</code> should take care when
+ * Services implementing {@code Configurable} should take care when
* returning a service configuration object since this object is probably
* sensitive.
* <p>
Modified: felix/trunk/framework/src/main/java/org/osgi/framework/Constants.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/osgi/framework/Constants.java?rev=1104564&r1=1104563&r2=1104564&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/framework/Constants.java (original)
+++ felix/trunk/framework/src/main/java/org/osgi/framework/Constants.java Tue May 17 21:20:32 2011
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2011). 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.
@@ -16,16 +16,19 @@
package org.osgi.framework;
+import org.osgi.framework.launch.Framework;
+
/**
* Defines standard names for the OSGi environment system properties, service
* properties, and Manifest header attribute keys.
*
* <p>
- * The values associated with these keys are of type
- * <code>String</code>, unless otherwise indicated.
+ * The values associated with these keys are of type {@code String}, unless
+ * otherwise indicated.
*
* @since 1.1
- * @version $Revision: 6552 $
+ * @noimplement
+ * @version $Id: 517c954ed7d34d2ee762933466f69fa03db7cd37 $
*/
public interface Constants {
@@ -33,7 +36,7 @@ public interface Constants {
* Location identifier of the OSGi <i>system bundle </i>, which is defined
* to be "System Bundle".
*/
- public static final String SYSTEM_BUNDLE_LOCATION = "System Bundle";
+ String SYSTEM_BUNDLE_LOCATION = "System Bundle";
/**
* Alias for the symbolic name of the OSGi <i>system bundle </i>. It is
@@ -41,50 +44,50 @@ public interface Constants {
*
* @since 1.3
*/
- public static final String SYSTEM_BUNDLE_SYMBOLICNAME = "system.bundle";
+ String SYSTEM_BUNDLE_SYMBOLICNAME = "system.bundle";
/**
* 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.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*/
- public static final String BUNDLE_CATEGORY = "Bundle-Category";
+ String BUNDLE_CATEGORY = "Bundle-Category";
/**
* 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>
- * object returned by the <code>Bundle.getHeaders</code> method.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*/
- public static final String BUNDLE_CLASSPATH = "Bundle-ClassPath";
+ String BUNDLE_CLASSPATH = "Bundle-ClassPath";
/**
* 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.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*/
- public static final String BUNDLE_COPYRIGHT = "Bundle-Copyright";
+ String BUNDLE_COPYRIGHT = "Bundle-Copyright";
/**
* 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.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*/
- public static final String BUNDLE_DESCRIPTION = "Bundle-Description";
+ String BUNDLE_DESCRIPTION = "Bundle-Description";
/**
* 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.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*/
- public static final String BUNDLE_NAME = "Bundle-Name";
+ String BUNDLE_NAME = "Bundle-Name";
/**
* Manifest header identifying a number of hardware environments and the
@@ -92,20 +95,20 @@ public interface Constants {
* these environments.
*
* <p>
- * The attribute value may be retrieved from the <code>Dictionary</code>
- * object returned by the <code>Bundle.getHeaders</code> method.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*/
- public static final String BUNDLE_NATIVECODE = "Bundle-NativeCode";
+ String BUNDLE_NATIVECODE = "Bundle-NativeCode";
/**
* 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>
- * object returned by the <code>Bundle.getHeaders</code> method.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*/
- public static final String EXPORT_PACKAGE = "Export-Package";
+ String EXPORT_PACKAGE = "Export-Package";
/**
* Manifest header identifying the fully qualified class names of the
@@ -113,108 +116,108 @@ public interface Constants {
* only).
*
* <p>
- * The attribute value may be retrieved from the <code>Dictionary</code>
- * object returned by the <code>Bundle.getHeaders</code> method.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*
* @deprecated As of 1.2.
*/
- public static final String EXPORT_SERVICE = "Export-Service";
+ String EXPORT_SERVICE = "Export-Service";
/**
* Manifest header identifying the packages on which the bundle depends.
*
* <p>
- * The attribute value may be retrieved from the <code>Dictionary</code>
- * object returned by the <code>Bundle.getHeaders</code> method.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*/
- public static final String IMPORT_PACKAGE = "Import-Package";
+ String IMPORT_PACKAGE = "Import-Package";
/**
* 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>
- * object returned by the <code>Bundle.getHeaders</code> method.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*
* @since 1.2
*/
- public static final String DYNAMICIMPORT_PACKAGE = "DynamicImport-Package";
+ String DYNAMICIMPORT_PACKAGE = "DynamicImport-Package";
/**
* 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>
- * object returned by the <code>Bundle.getHeaders</code> method.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*
* @deprecated As of 1.2.
*/
- public static final String IMPORT_SERVICE = "Import-Service";
+ String IMPORT_SERVICE = "Import-Service";
/**
* Manifest header identifying the bundle's vendor.
*
* <p>
- * The attribute value may be retrieved from the <code>Dictionary</code>
- * object returned by the <code>Bundle.getHeaders</code> method.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*/
- public static final String BUNDLE_VENDOR = "Bundle-Vendor";
+ String BUNDLE_VENDOR = "Bundle-Vendor";
/**
* Manifest header identifying the bundle's version.
*
* <p>
- * The attribute value may be retrieved from the <code>Dictionary</code>
- * object returned by the <code>Bundle.getHeaders</code> method.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*/
- public static final String BUNDLE_VERSION = "Bundle-Version";
+ String BUNDLE_VERSION = "Bundle-Version";
/**
* 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>
- * object returned by the <code>Bundle.getHeaders</code> method.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*/
- public static final String BUNDLE_DOCURL = "Bundle-DocURL";
+ String BUNDLE_DOCURL = "Bundle-DocURL";
/**
* 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>
- * object returned by the <code>Bundle.getHeaders</code> method.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*/
- public static final String BUNDLE_CONTACTADDRESS = "Bundle-ContactAddress";
+ String BUNDLE_CONTACTADDRESS = "Bundle-ContactAddress";
/**
* Manifest header attribute identifying the bundle's activator class.
*
* <p>
* If present, this header specifies the name of the bundle resource class
- * that implements the <code>BundleActivator</code> interface and whose
- * <code>start</code> and <code>stop</code> methods are called by the
- * Framework when the bundle is started and stopped, respectively.
+ * that implements the {@code BundleActivator} interface and whose
+ * {@code start} and {@code stop} methods are called by the Framework when
+ * the bundle is started and stopped, respectively.
*
* <p>
- * The attribute value may be retrieved from the <code>Dictionary</code>
- * object returned by the <code>Bundle.getHeaders</code> method.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*/
- public static final String BUNDLE_ACTIVATOR = "Bundle-Activator";
+ String BUNDLE_ACTIVATOR = "Bundle-Activator";
/**
* 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>
- * object returned by the <code>Bundle.getHeaders</code> method.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*/
- public static final String BUNDLE_UPDATELOCATION = "Bundle-UpdateLocation";
+ String BUNDLE_UPDATELOCATION = "Bundle-UpdateLocation";
/**
* Manifest header attribute identifying the version of a package specified
@@ -223,7 +226,7 @@ public interface Constants {
* @deprecated As of 1.3. This has been replaced by
* {@link #VERSION_ATTRIBUTE}.
*/
- public static final String PACKAGE_SPECIFICATION_VERSION = "specification-version";
+ String PACKAGE_SPECIFICATION_VERSION = "specification-version";
/**
* Manifest header attribute identifying the processor required to run
@@ -239,7 +242,7 @@ public interface Constants {
*
* @see #BUNDLE_NATIVECODE
*/
- public static final String BUNDLE_NATIVECODE_PROCESSOR = "processor";
+ String BUNDLE_NATIVECODE_PROCESSOR = "processor";
/**
* Manifest header attribute identifying the operating system required to
@@ -255,7 +258,7 @@ public interface Constants {
*
* @see #BUNDLE_NATIVECODE
*/
- public static final String BUNDLE_NATIVECODE_OSNAME = "osname";
+ String BUNDLE_NATIVECODE_OSNAME = "osname";
/**
* Manifest header attribute identifying the operating system version
@@ -271,7 +274,7 @@ public interface Constants {
*
* @see #BUNDLE_NATIVECODE
*/
- public static final String BUNDLE_NATIVECODE_OSVERSION = "osversion";
+ String BUNDLE_NATIVECODE_OSVERSION = "osversion";
/**
* Manifest header attribute identifying the language in which the native
@@ -287,7 +290,7 @@ public interface Constants {
*
* @see #BUNDLE_NATIVECODE
*/
- public static final String BUNDLE_NATIVECODE_LANGUAGE = "language";
+ String BUNDLE_NATIVECODE_LANGUAGE = "language";
/**
* Manifest header identifying the required execution environment for the
@@ -296,27 +299,28 @@ public interface Constants {
* environments it implements.
*
* <p>
- * The attribute value may be retrieved from the <code>Dictionary</code>
- * object returned by the <code>Bundle.getHeaders</code> method.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*
* @since 1.2
+ * @deprecated As of 1.6. Replaced by the {@code osgi.ee} capability.
*/
- public static final String BUNDLE_REQUIREDEXECUTIONENVIRONMENT = "Bundle-RequiredExecutionEnvironment";
+ String BUNDLE_REQUIREDEXECUTIONENVIRONMENT = "Bundle-RequiredExecutionEnvironment";
/**
* Manifest header 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.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*
* @since 1.3
*/
- public final static String BUNDLE_SYMBOLICNAME = "Bundle-SymbolicName";
+ String BUNDLE_SYMBOLICNAME = "Bundle-SymbolicName";
/**
* Manifest header directive identifying whether a bundle is a singleton.
- * The default value is <code>false</code>.
+ * The default value is {@code false}.
*
* <p>
* The directive value is encoded in the Bundle-SymbolicName manifest header
@@ -326,14 +330,10 @@ public interface Constants {
* 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";
+ String SINGLETON_DIRECTIVE = "singleton";
/**
* Manifest header directive identifying if and when a fragment may attach
@@ -354,7 +354,7 @@ public interface Constants {
* @see #FRAGMENT_ATTACHMENT_NEVER
* @since 1.3
*/
- public final static String FRAGMENT_ATTACHMENT_DIRECTIVE = "fragment-attachment";
+ String FRAGMENT_ATTACHMENT_DIRECTIVE = "fragment-attachment";
/**
* Manifest header directive value identifying a fragment attachment type of
@@ -373,7 +373,7 @@ public interface Constants {
* @see #FRAGMENT_ATTACHMENT_DIRECTIVE
* @since 1.3
*/
- public final static String FRAGMENT_ATTACHMENT_ALWAYS = "always";
+ String FRAGMENT_ATTACHMENT_ALWAYS = "always";
/**
* Manifest header directive value identifying a fragment attachment type of
@@ -392,7 +392,7 @@ public interface Constants {
* @see #FRAGMENT_ATTACHMENT_DIRECTIVE
* @since 1.3
*/
- public final static String FRAGMENT_ATTACHMENT_RESOLVETIME = "resolve-time";
+ String FRAGMENT_ATTACHMENT_RESOLVETIME = "resolve-time";
/**
* Manifest header directive value identifying a fragment attachment type of
@@ -410,46 +410,45 @@ public interface Constants {
* @see #FRAGMENT_ATTACHMENT_DIRECTIVE
* @since 1.3
*/
- public final static String FRAGMENT_ATTACHMENT_NEVER = "never";
+ String FRAGMENT_ATTACHMENT_NEVER = "never";
/**
* 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.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*
* @see #BUNDLE_LOCALIZATION_DEFAULT_BASENAME
* @since 1.3
*/
- public final static String BUNDLE_LOCALIZATION = "Bundle-Localization";
+ String BUNDLE_LOCALIZATION = "Bundle-Localization";
/**
- * Default value for the <code>Bundle-Localization</code> manifest header.
+ * Default value for the {@code Bundle-Localization} manifest header.
*
* @see #BUNDLE_LOCALIZATION
* @since 1.3
*/
- public final static String BUNDLE_LOCALIZATION_DEFAULT_BASENAME = "OSGI-INF/l10n/bundle";
+ String BUNDLE_LOCALIZATION_DEFAULT_BASENAME = "OSGI-INF/l10n/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>
- * object returned by the <code>Bundle.getHeaders</code> method.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*
* @since 1.3
*/
- public final static String REQUIRE_BUNDLE = "Require-Bundle";
+ String REQUIRE_BUNDLE = "Require-Bundle";
/**
* 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>.
+ * specified in the {@code Require-Bundle} or {@code Fragment-Host} manifest
+ * headers. The default value is {@code 0.0.0}.
*
* <p>
* The attribute value is encoded in the Require-Bundle manifest header
@@ -469,19 +468,19 @@ public interface Constants {
* @see #REQUIRE_BUNDLE
* @since 1.3
*/
- public static final String BUNDLE_VERSION_ATTRIBUTE = "bundle-version";
+ String BUNDLE_VERSION_ATTRIBUTE = "bundle-version";
/**
* 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>
- * object returned by the <code>Bundle.getHeaders</code> method.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*
* @since 1.3
*/
- public final static String FRAGMENT_HOST = "Fragment-Host";
+ String FRAGMENT_HOST = "Fragment-Host";
/**
* Manifest header attribute is used for selection by filtering based upon
@@ -497,7 +496,7 @@ public interface Constants {
* @see #BUNDLE_NATIVECODE
* @since 1.3
*/
- public final static String SELECTION_FILTER_ATTRIBUTE = "selection-filter";
+ String SELECTION_FILTER_ATTRIBUTE = "selection-filter";
/**
* Manifest header identifying the bundle manifest version. A bundle
@@ -509,12 +508,12 @@ public interface Constants {
* specifically, by version 1.3 of the OSGi Core Specification is "2".
*
* <p>
- * The attribute value may be retrieved from the <code>Dictionary</code>
- * object returned by the <code>Bundle.getHeaders</code> method.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*
* @since 1.3
*/
- public final static String BUNDLE_MANIFESTVERSION = "Bundle-ManifestVersion";
+ String BUNDLE_MANIFESTVERSION = "Bundle-ManifestVersion";
/**
* Manifest header attribute identifying the version of a package specified
@@ -525,14 +524,14 @@ public interface Constants {
* manifest header like:
*
* <pre>
- * Import-Package: org.osgi.framework; version="1.1"
+ * Export-Package: org.osgi.framework; version="1.1"
* </pre>
*
* @see #EXPORT_PACKAGE
* @see #IMPORT_PACKAGE
* @since 1.3
*/
- public final static String VERSION_ATTRIBUTE = "version";
+ String VERSION_ATTRIBUTE = "version";
/**
* Manifest header attribute identifying the symbolic name of a bundle that
@@ -549,88 +548,96 @@ public interface Constants {
* @see #IMPORT_PACKAGE
* @since 1.3
*/
- public final static String BUNDLE_SYMBOLICNAME_ATTRIBUTE = "bundle-symbolic-name";
+ String BUNDLE_SYMBOLICNAME_ATTRIBUTE = "bundle-symbolic-name";
/**
* Manifest header directive identifying the resolution type in the
- * Import-Package or Require-Bundle manifest header. The default value is
- * {@link #RESOLUTION_MANDATORY mandatory}.
+ * Import-Package, Require-Bundle or Require-Capability manifest header. The
+ * default value is {@link #RESOLUTION_MANDATORY mandatory}.
*
* <p>
- * The directive value is encoded in the Import-Package or Require-Bundle
- * manifest header like:
+ * The directive value is encoded in the Import-Package, Require-Bundle or
+ * Require-Capability manifest header like:
*
* <pre>
* Import-Package: org.osgi.framework; resolution:="optional"
* Require-Bundle: com.acme.module.test; resolution:="optional"
+ * Require-Capability: com.acme.capability; resolution:="optional"
* </pre>
*
* @see #IMPORT_PACKAGE
* @see #REQUIRE_BUNDLE
+ * @see #REQUIRE_CAPABILITY
* @see #RESOLUTION_MANDATORY
* @see #RESOLUTION_OPTIONAL
* @since 1.3
*/
- public final static String RESOLUTION_DIRECTIVE = "resolution";
+ String RESOLUTION_DIRECTIVE = "resolution";
/**
* 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.
+ * A mandatory resolution type indicates that the import package, require
+ * bundle or require capability must be resolved when the bundle is
+ * resolved. If such an import, require bundle or require capability cannot
+ * be resolved, the module fails to resolve.
*
* <p>
- * The directive value is encoded in the Import-Package or Require-Bundle
- * manifest header like:
+ * The directive value is encoded in the Import-Package, Require-Bundle or
+ * Require-Capability manifest header like:
*
* <pre>
- * Import-Package: org.osgi.framework; resolution:="manditory"
- * Require-Bundle: com.acme.module.test; resolution:="manditory"
+ * Import-Package: org.osgi.framework; resolution:="mandatory"
+ * Require-Bundle: com.acme.module.test; resolution:="mandatory"
+ * Require-Capability: com.acme.capability; resolution:="mandatory"
* </pre>
*
* @see #RESOLUTION_DIRECTIVE
* @since 1.3
*/
- public final static String RESOLUTION_MANDATORY = "mandatory";
+ String RESOLUTION_MANDATORY = "mandatory";
/**
* 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.
+ * An optional resolution type indicates that the import, require bundle or
+ * require capability is optional and the bundle may be resolved without the
+ * import, require bundle or require capability being resolved. If the
+ * import, require bundle or require capability is not resolved when the
+ * bundle is resolved, the import, require bundle or require capability may
+ * not be resolved until the bundle is refreshed.
*
* <p>
- * The directive value is encoded in the Import-Package or Require-Bundle
- * manifest header like:
+ * The directive value is encoded in the Import-Package, Require-Bundle or
+ * Require-Capability manifest header like:
*
* <pre>
* Import-Package: org.osgi.framework; resolution:="optional"
* Require-Bundle: com.acme.module.test; resolution:="optional"
+ * Require-Capability: com.acme.capability; resolution:="optional"
* </pre>
*
* @see #RESOLUTION_DIRECTIVE
* @since 1.3
*/
- public final static String RESOLUTION_OPTIONAL = "optional";
+ String RESOLUTION_OPTIONAL = "optional";
/**
* Manifest header directive identifying a list of packages that an exported
- * package uses.
+ * package or provided capability uses.
*
* <p>
- * The directive value is encoded in the Export-Package manifest header
- * like:
+ * The directive value is encoded in the Export-Package or
+ * Provide-Capability manifest header like:
*
* <pre>
* Export-Package: org.osgi.util.tracker; uses:="org.osgi.framework"
+ * Provide-Capability: com.acme.capability; uses:="com.acme.service"
* </pre>
*
* @see #EXPORT_PACKAGE
+ * @see #PROVIDE_CAPABILITY
* @since 1.3
*/
- public final static String USES_DIRECTIVE = "uses";
+ String USES_DIRECTIVE = "uses";
/**
* Manifest header directive identifying a list of classes to include in the
@@ -660,7 +667,7 @@ public interface Constants {
* @see #BUNDLE_ACTIVATIONPOLICY
* @since 1.3
*/
- public final static String INCLUDE_DIRECTIVE = "include";
+ String INCLUDE_DIRECTIVE = "include";
/**
* Manifest header directive identifying a list of classes to exclude in the
@@ -689,7 +696,7 @@ public interface Constants {
* @see #BUNDLE_ACTIVATIONPOLICY
* @since 1.3
*/
- public final static String EXCLUDE_DIRECTIVE = "exclude";
+ String EXCLUDE_DIRECTIVE = "exclude";
/**
* Manifest header directive identifying names of matching attributes which
@@ -707,7 +714,7 @@ public interface Constants {
* @see #EXPORT_PACKAGE
* @since 1.3
*/
- public final static String MANDATORY_DIRECTIVE = "mandatory";
+ String MANDATORY_DIRECTIVE = "mandatory";
/**
* Manifest header directive identifying the visibility of a required bundle
@@ -727,7 +734,7 @@ public interface Constants {
* @see #VISIBILITY_REEXPORT
* @since 1.3
*/
- public final static String VISIBILITY_DIRECTIVE = "visibility";
+ String VISIBILITY_DIRECTIVE = "visibility";
/**
* Manifest header directive value identifying a private visibility type. A
@@ -746,7 +753,7 @@ public interface Constants {
* @see #VISIBILITY_DIRECTIVE
* @since 1.3
*/
- public final static String VISIBILITY_PRIVATE = "private";
+ String VISIBILITY_PRIVATE = "private";
/**
* Manifest header directive value identifying a reexport visibility type. A
@@ -766,7 +773,7 @@ public interface Constants {
* @see #VISIBILITY_DIRECTIVE
* @since 1.3
*/
- public final static String VISIBILITY_REEXPORT = "reexport";
+ String VISIBILITY_REEXPORT = "reexport";
/**
* Manifest header directive identifying the type of the extension fragment.
@@ -783,7 +790,7 @@ public interface Constants {
* @see #EXTENSION_BOOTCLASSPATH
* @since 1.3
*/
- public final static String EXTENSION_DIRECTIVE = "extension";
+ String EXTENSION_DIRECTIVE = "extension";
/**
* Manifest header directive value identifying the type of extension
@@ -800,7 +807,7 @@ public interface Constants {
* @see #EXTENSION_DIRECTIVE
* @since 1.3
*/
- public final static String EXTENSION_FRAMEWORK = "framework";
+ String EXTENSION_FRAMEWORK = "framework";
/**
* Manifest header directive value identifying the type of extension
@@ -817,20 +824,20 @@ public interface Constants {
* @see #EXTENSION_DIRECTIVE
* @since 1.3
*/
- public final static String EXTENSION_BOOTCLASSPATH = "bootclasspath";
+ String EXTENSION_BOOTCLASSPATH = "bootclasspath";
/**
* 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.
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
*
* @since 1.4
* @see #ACTIVATION_LAZY
* @see #INCLUDE_DIRECTIVE
* @see #EXCLUDE_DIRECTIVE
*/
- public final static String BUNDLE_ACTIVATIONPOLICY = "Bundle-ActivationPolicy";
+ String BUNDLE_ACTIVATIONPOLICY = "Bundle-ActivationPolicy";
/**
* Bundle activation policy declaring the bundle must be activated when the
@@ -854,16 +861,16 @@ public interface Constants {
* @see Bundle#START_ACTIVATION_POLICY
* @since 1.4
*/
- public final static String ACTIVATION_LAZY = "lazy";
+ String ACTIVATION_LAZY = "lazy";
/**
* Framework environment property identifying the Framework version.
*
* <p>
* The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
+ * {@code BundleContext.getProperty} method.
*/
- public static final String FRAMEWORK_VERSION = "org.osgi.framework.version";
+ String FRAMEWORK_VERSION = "org.osgi.framework.version";
/**
* Framework environment property identifying the Framework implementation
@@ -871,79 +878,79 @@ public interface Constants {
*
* <p>
* The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
+ * {@code BundleContext.getProperty} method.
*/
- public static final String FRAMEWORK_VENDOR = "org.osgi.framework.vendor";
+ String FRAMEWORK_VENDOR = "org.osgi.framework.vendor";
/**
- * Framework environment property identifying the Framework implementation
+ * Framework launching 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.
+ * {@code BundleContext.getProperty} method.
*/
- public static final String FRAMEWORK_LANGUAGE = "org.osgi.framework.language";
+ String FRAMEWORK_LANGUAGE = "org.osgi.framework.language";
/**
- * Framework environment property identifying the Framework host-computer's
+ * Framework launching 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.
+ * {@code BundleContext.getProperty} method.
*/
- public static final String FRAMEWORK_OS_NAME = "org.osgi.framework.os.name";
+ String FRAMEWORK_OS_NAME = "org.osgi.framework.os.name";
/**
- * Framework environment property identifying the Framework host-computer's
+ * Framework launching 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.
+ * {@code BundleContext.getProperty} method.
*/
- public static final String FRAMEWORK_OS_VERSION = "org.osgi.framework.os.version";
+ String FRAMEWORK_OS_VERSION = "org.osgi.framework.os.version";
/**
- * Framework environment property identifying the Framework host-computer's
+ * Framework launching 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.
+ * {@code BundleContext.getProperty} method.
*/
- public static final String FRAMEWORK_PROCESSOR = "org.osgi.framework.processor";
+ String FRAMEWORK_PROCESSOR = "org.osgi.framework.processor";
/**
- * Framework environment property identifying execution environments
- * provided by the Framework.
+ * Framework launching 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.
+ * {@code BundleContext.getProperty} method.
*
* @since 1.2
+ * @deprecated As of 1.6. Replaced by the {@code osgi.ee} capability.
*/
- public static final String FRAMEWORK_EXECUTIONENVIRONMENT = "org.osgi.framework.executionenvironment";
+ 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.
+ * Framework launching 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.
+ * {@code BundleContext.getProperty} method.
*
* @see #FRAMEWORK_BUNDLE_PARENT
* @since 1.3
*/
- public static final String FRAMEWORK_BOOTDELEGATION = "org.osgi.framework.bootdelegation";
+ String FRAMEWORK_BOOTDELEGATION = "org.osgi.framework.bootdelegation";
/**
- * Framework environment property identifying packages which the system
- * bundle must export.
+ * Framework launching property identifying packages which the system bundle
+ * must export.
*
* <p>
* If this property is not specified then the framework must calculate a
@@ -951,15 +958,15 @@ public interface Constants {
*
* <p>
* The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
+ * {@code BundleContext.getProperty} method.
*
* @since 1.3
*/
- public static final String FRAMEWORK_SYSTEMPACKAGES = "org.osgi.framework.system.packages";
+ 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.
+ * Framework launching 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
@@ -967,84 +974,84 @@ public interface Constants {
*
* <p>
* The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
+ * {@code BundleContext.getProperty} method.
*
* @see #FRAMEWORK_SYSTEMPACKAGES
* @since 1.5
*/
- public static final String FRAMEWORK_SYSTEMPACKAGES_EXTRA = "org.osgi.framework.system.packages.extra";
+ 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.
+ * As of version 1.4, the value of this property must be {@code true}. The
+ * Framework must support framework extension bundles.
*
* <p>
* The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
+ * {@code BundleContext.getProperty} method.
*
* @since 1.3
*/
- public static final String SUPPORTS_FRAMEWORK_EXTENSION = "org.osgi.supports.framework.extension";
+ 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
+ * If the value of this property is {@code true}, then the Framework
* supports bootclasspath extension bundles. The default value is
- * <code>false</code>.
+ * {@code false}.
* <p>
* The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
+ * {@code BundleContext.getProperty} method.
*
* @since 1.3
*/
- public static final String SUPPORTS_BOOTCLASSPATH_EXTENSION = "org.osgi.supports.bootclasspath.extension";
+ 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.
+ * As of version 1.4, the value of this property must be {@code true}. The
+ * Framework must support fragment bundles.
* <p>
* The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
+ * {@code BundleContext.getProperty} method.
*
* @since 1.3
*/
- public static final String SUPPORTS_FRAMEWORK_FRAGMENT = "org.osgi.supports.framework.fragment";
+ 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.
+ * As of version 1.4, the value of this property must be {@code true}. The
+ * Framework must support the {@code Require-Bundle} manifest header.
* <p>
* The value of this property may be retrieved by calling the
- * <code>BundleContext.getProperty</code> method.
+ * {@code BundleContext.getProperty} method.
*
* @since 1.3
*/
- public static final String SUPPORTS_FRAMEWORK_REQUIREBUNDLE = "org.osgi.supports.framework.requirebundle";
+ 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.
+ * Framework launching property specifying 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";
+ String FRAMEWORK_SECURITY = "org.osgi.framework.security";
/**
* Specifies that a security manager that supports all security aspects of
@@ -1053,39 +1060,40 @@ public interface Constants {
*
* <p>
* If this value is specified and there is a security manager already
- * installed, then a <code>SecurityException</code> must be thrown when the
+ * installed, then a {@code SecurityException} must be thrown when the
* Framework is initialized.
*
* @see #FRAMEWORK_SECURITY
* @since 1.5
*/
- public final static String FRAMEWORK_SECURITY_OSGI = "osgi";
+ 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.
+ * Framework launching property specifying 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";
+ 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.
+ * Framework launching property specifying 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";
+ String FRAMEWORK_STORAGE_CLEAN = "org.osgi.framework.storage.clean";
/**
* Specifies that the framework storage area must be cleaned before the
@@ -1095,29 +1103,29 @@ public interface Constants {
*
* @since 1.5
*/
- public final static String FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT = "onFirstInit";
+ 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.
+ * Framework launching property specifying 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)} 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}
+ * and {@code .so}, but {@code System.mapLibraryName(String)} will only
+ * return names with the {@code .a} extension.
*
* @since 1.5
*/
- public final static String FRAMEWORK_LIBRARY_EXTENSIONS = "org.osgi.framework.library.extensions";
+ 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.
+ * Framework launching property specifying 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}
@@ -1128,16 +1136,24 @@ public interface Constants {
*
* @since 1.5
*/
- public final static String FRAMEWORK_EXECPERMISSION = "org.osgi.framework.command.execpermission";
+ 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.
+ * Specified the substitution string for the absolute path of a file.
+ *
+ * @see #FRAMEWORK_EXECPERMISSION
+ * @since 1.6
+ */
+ String FRAMEWORK_COMMAND_ABSPATH = "abspath";
+
+ /**
+ * Framework launching property specifying the trust repositories used by
+ * the framework. The value is a {@code java.io.File.pathSeparator}
+ * separated list of valid file paths to files that contain key stores of
+ * type {@code JKS}. 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
@@ -1146,27 +1162,29 @@ public interface Constants {
*
* @since 1.5
*/
- public final static String FRAMEWORK_TRUST_REPOSITORIES = "org.osgi.framework.trust.repositories";
+ 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.
+ * Framework launching property specifying 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";
+ String FRAMEWORK_WINDOWSYSTEM = "org.osgi.framework.windowsystem";
/**
- * Specifies the beginning start level of the framework.
+ * Framework launching property specifying the beginning start level of the
+ * framework.
*
- * @see "Core Specification, section 8.2.3."
+ * @see "Core Specification, Starting the Framework."
* @since 1.5
*/
- public final static String FRAMEWORK_BEGINNING_STARTLEVEL = "org.osgi.framework.startlevel.beginning";
+ 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}.
+ * Framework launching property specifying 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
@@ -1174,7 +1192,7 @@ public interface Constants {
* @see #FRAMEWORK_BUNDLE_PARENT_FRAMEWORK
* @since 1.5
*/
- public final static String FRAMEWORK_BUNDLE_PARENT = "org.osgi.framework.bundle.parent";
+ String FRAMEWORK_BUNDLE_PARENT = "org.osgi.framework.bundle.parent";
/**
* Specifies to use of the boot class loader as the parent class loader for
@@ -1183,7 +1201,7 @@ public interface Constants {
* @since 1.5
* @see #FRAMEWORK_BUNDLE_PARENT
*/
- public final static String FRAMEWORK_BUNDLE_PARENT_BOOT = "boot";
+ String FRAMEWORK_BUNDLE_PARENT_BOOT = "boot";
/**
* Specifies to use the extension class loader as the parent class loader
@@ -1192,48 +1210,48 @@ public interface Constants {
* @since 1.5
* @see #FRAMEWORK_BUNDLE_PARENT
*/
- public final static String FRAMEWORK_BUNDLE_PARENT_EXT = "ext";
+ 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
+ * 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";
+ 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
+ * 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";
+ 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>.
+ * type {@code String[]}.
*
* <p>
* This property is set by the Framework when a service is registered.
*/
- public static final String OBJECTCLASS = "objectClass";
+ String OBJECTCLASS = "objectClass";
/**
* Service property identifying a service's registration number. The value
- * of this property must be of type <code>Long</code>.
+ * of this property must be of type {@code Long}.
*
* <p>
* The value of this property is assigned by the Framework when a service is
@@ -1241,72 +1259,426 @@ public interface Constants {
* 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";
+ 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>.
+ * This property may be supplied in the {@code properties}
+ * {@code Dictionary} object passed to the
+ * {@code BundleContext.registerService} method. The value of this property
+ * must be of type {@code String}, {@code String[]}, or {@code Collection}
+ * of {@code String}.
*
* <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
+ * By convention, every bundle has its own unique name space, 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";
+ 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>.
+ * This property may be supplied in the {@code properties
+ * Dictionary} object passed to the {@code BundleContext.registerService}
+ * method. The value of this property must be of type {@code Integer}.
*
* <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
+ * order</i> of services, see {@link ServiceReference#compareTo}, 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.
+ * {@code Integer.MAX_VALUE} is very likely to be returned as the default
+ * service, whereas a service with a ranking of {@code Integer.MIN_VALUE} is
+ * very unlikely to be returned.
*
* <p>
- * If the supplied property value is not of type <code>Integer</code>, it is
+ * If the supplied property value is not of type {@code Integer}, it is
* deemed to have a ranking value of zero.
*/
- public static final String SERVICE_RANKING = "service.ranking";
+ 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.
+ * This property may be supplied in the properties {@code Dictionary} object
+ * passed to the {@code BundleContext.registerService} method.
*/
- public static final String SERVICE_VENDOR = "service.vendor";
+ 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.
+ * This property may be supplied in the properties {@code Dictionary} object
+ * passed to the {@code BundleContext.registerService} method.
+ */
+ String SERVICE_DESCRIPTION = "service.description";
+
+ /**
+ * Framework environment property identifying the Framework's universally
+ * unique identifier (UUID). A UUID represents a 128-bit value. A new UUID
+ * is generated by the {@link Framework#init()} method each time a framework
+ * is initialized. The value of this property must conform to the UUID
+ * string representation specified in <a
+ * href="http://www.ietf.org/rfc/rfc4122.txt">RFC 4122</a>.
+ *
+ * <p>
+ * The value of this property may be retrieved by calling the
+ * {@code BundleContext.getProperty} method.
+ *
+ * @since 1.6
+ */
+ String FRAMEWORK_UUID = "org.osgi.framework.uuid";
+
+ /**
+ * Service property identifying the configuration types supported by a
+ * distribution provider. Registered by the distribution provider on one of
+ * its services to indicate the supported configuration types.
+ *
+ * <p>
+ * The value of this property must be of type {@code String},
+ * {@code String[]}, or {@code Collection} of {@code String}.
+ *
+ * @since 1.6
+ * @see "Remote Services Specification"
+ */
+ String REMOTE_CONFIGS_SUPPORTED = "remote.configs.supported";
+
+ /**
+ * Service property identifying the intents supported by a distribution
+ * provider. Registered by the distribution provider on one of its services
+ * to indicate the vocabulary of implemented intents.
+ *
+ * <p>
+ * The value of this property must be of type {@code String},
+ * {@code String[]}, or {@code Collection} of {@code String}.
+ *
+ * @since 1.6
+ * @see "Remote Services Specification"
+ */
+ String REMOTE_INTENTS_SUPPORTED = "remote.intents.supported";
+
+ /**
+ * Service property identifying the configuration types that should be used
+ * to export the service. Each configuration type represents the
+ * configuration parameters for an endpoint. A distribution provider should
+ * create an endpoint for each configuration type that it supports.
+ *
+ * <p>
+ * This property may be supplied in the {@code properties}
+ * {@code Dictionary} object passed to the
+ * {@code BundleContext.registerService} method. The value of this property
+ * must be of type {@code String}, {@code String[]}, or {@code Collection}
+ * of {@code String}.
+ *
+ * @since 1.6
+ * @see "Remote Services Specification"
+ */
+ String SERVICE_EXPORTED_CONFIGS = "service.exported.configs";
+
+ /**
+ * Service property identifying the intents that the distribution provider
+ * must implement to distribute the service. Intents listed in this property
+ * are reserved for intents that are critical for the code to function
+ * correctly, for example, ordering of messages. These intents should not be
+ * configurable.
+ *
+ * <p>
+ * This property may be supplied in the {@code properties}
+ * {@code Dictionary} object passed to the
+ * {@code BundleContext.registerService} method. The value of this property
+ * must be of type {@code String}, {@code String[]}, or {@code Collection}
+ * of {@code String}.
+ *
+ * @since 1.6
+ * @see "Remote Services Specification"
+ */
+ String SERVICE_EXPORTED_INTENTS = "service.exported.intents";
+
+ /**
+ * Service property identifying the extra intents that the distribution
+ * provider must implement to distribute the service. This property is
+ * merged with the {@code service.exported.intents} property before the
+ * distribution provider interprets the listed intents; it has therefore the
+ * same semantics but the property should be configurable so the
+ * administrator can choose the intents based on the topology. Bundles
+ * should therefore make this property configurable, for example through the
+ * Configuration Admin service.
+ *
+ * <p>
+ * This property may be supplied in the {@code properties}
+ * {@code Dictionary} object passed to the
+ * {@code BundleContext.registerService} method. The value of this property
+ * must be of type {@code String}, {@code String[]}, or {@code Collection}
+ * of {@code String}.
+ *
+ * @since 1.6
+ * @see "Remote Services Specification"
+ */
+ String SERVICE_EXPORTED_INTENTS_EXTRA = "service.exported.intents.extra";
+
+ /**
+ * Service property marking the service for export. It defines the
+ * interfaces under which this service can be exported. This list must be a
+ * subset of the types under which the service was registered. The single
+ * value of an asterisk ("*", \u002A) indicates all the
+ * interface types under which the service was registered excluding the
+ * non-interface types. It is strongly recommended to only export interface
+ * types and not concrete classes due to the complexity of creating proxies
+ * for some type of concrete classes.
+ *
+ * <p>
+ * This property may be supplied in the {@code properties}
+ * {@code Dictionary} object passed to the
+ * {@code BundleContext.registerService} method. The value of this property
+ * must be of type {@code String}, {@code String[]}, or {@code Collection}
+ * of {@code String}.
+ *
+ * @since 1.6
+ * @see "Remote Services Specification"
+ */
+ String SERVICE_EXPORTED_INTERFACES = "service.exported.interfaces";
+
+ /**
+ * Service property identifying the service as imported. This service
+ * property must be set by a distribution provider to any value when it
+ * registers the endpoint proxy as an imported service. A bundle can use
+ * this property to filter out imported services.
+ *
+ * <p>
+ * The value of this property may be of any type.
+ *
+ * @since 1.6
+ * @see "Remote Services Specification"
+ */
+ String SERVICE_IMPORTED = "service.imported";
+
+ /**
+ * Service property identifying the configuration types used to import the
+ * service. Any associated properties for this configuration types must be
+ * properly mapped to the importing system. For example, a URL in these
+ * properties must point to a valid resource when used in the importing
+ * framework. If multiple configuration types are listed in this property,
+ * then they must be synonyms for exactly the same remote endpoint that is
+ * used to export this service.
+ *
+ * <p>
+ * The value of this property must be of type {@code String},
+ * {@code String[]}, or {@code Collection} of {@code String}.
+ *
+ * @since 1.6
+ * @see "Remote Services Specification"
+ * @see #SERVICE_EXPORTED_CONFIGS
+ */
+ String SERVICE_IMPORTED_CONFIGS = "service.imported.configs";
+
+ /**
+ * Service property identifying the intents that this service implement.
+ * This property has a dual purpose:
+ * <ul>
+ * <li>A bundle can use this service property to notify the distribution
+ * provider that these intents are already implemented by the exported
+ * service object.</li>
+ * <li>A distribution provider must use this property to convey the combined
+ * intents of: the exporting service, the intents that the exporting
+ * distribution provider adds, and the intents that the importing
+ * distribution provider adds.</li>
+ * </ul>
+ *
+ * To export a service, a distribution provider must expand any qualified
+ * intents. Both the exporting and importing distribution providers must
+ * recognize all intents before a service can be distributed.
+ *
+ * <p>
+ * The value of this property must be of type {@code String},
+ * {@code String[]}, or {@code Collection} of {@code String}.
+ *
+ * @since 1.6
+ * @see "Remote Services Specification"
+ */
+ String SERVICE_INTENTS = "service.intents";
+
+ /**
+ * Manifest header identifying the capabilities that the bundle offers to
+ * provide to other bundles.
+ *
+ * <p>
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
+ *
+ * @since 1.6
+ */
+ String PROVIDE_CAPABILITY = "Provide-Capability";
+
+ /**
+ * Manifest header identifying the capabilities on which the bundle depends.
+ *
+ * <p>
+ * The header value may be retrieved from the {@code Dictionary} object
+ * returned by the {@code Bundle.getHeaders} method.
+ *
+ * @since 1.6
+ */
+ String REQUIRE_CAPABILITY = "Require-Capability";
+
+ /**
+ * Manifest header directive identifying the effective time of the provided
+ * capability. The default value is {@link #EFFECTIVE_RESOLVE resolve}.
+ *
+ * <p>
+ * The directive value is encoded in the Provide-Capability manifest header
+ * like:
+ *
+ * <pre>
+ * Provide-Capability: com.acme.capability; effective:="resolve"
+ * </pre>
+ *
+ * @see #PROVIDE_CAPABILITY
+ * @see #EFFECTIVE_RESOLVE
+ * @see #EFFECTIVE_ACTIVE
+ * @since 1.6
+ */
+ String EFFECTIVE_DIRECTIVE = "effective";
+
+ /**
+ * Manifest header directive value identifying a capability that is
+ * effective at resolve time. Capabilities with an effective time of resolve
+ * are the only capabilities which are processed by the resolver.
+ *
+ * <p>
+ * The directive value is encoded in the Provide-Capability manifest header
+ * like:
+ *
+ * <pre>
+ * Provide-Capability: com.acme.capability; effective:="resolve"
+ * </pre>
+ *
+ * @see #EFFECTIVE_DIRECTIVE
+ * @since 1.6
+ */
+ String EFFECTIVE_RESOLVE = "resolve";
+
+ /**
+ * Manifest header directive value identifying a capability that is
+ * effective at active time. Capabilities with an effective time of active
+ * are ignored by the resolver.
+ *
+ * <p>
+ * The directive value is encoded in the Provide-Capability manifest header
+ * like:
+ *
+ * <pre>
+ * Provide-Capability: com.acme.capability; effective:="active"
+ * </pre>
+ *
+ * @see #EFFECTIVE_DIRECTIVE
+ * @since 1.6
+ */
+ String EFFECTIVE_ACTIVE = "active";
+
+ /**
+ * Manifest header directive identifying the capability filter specified in
+ * the Require-Capability manifest header.
+ *
+ * <p>
+ * The directive value is encoded in the Require-Capability manifest header
+ * like:
+ *
+ * <pre>
+ * Require-Capability: com.acme.capability; filter:="(someattr=somevalue)"
+ * </pre>
+ *
+ * @see #REQUIRE_CAPABILITY
+ * @since 1.6
+ */
+ String FILTER_DIRECTIVE = "filter";
+
+ /**
+ * Framework launching property identifying capabilities which the system
+ * bundle must provide.
+ *
+ * <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} method.
+ *
+ * @since 1.6
+ */
+ String FRAMEWORK_SYSTEMCAPABILITIES = "org.osgi.framework.system.capabilities";
+
+ /**
+ * Framework launching property identifying extra capabilities which the
+ * system bundle must additionally provide.
+ *
+ * <p>
+ * This property is useful for configuring extra system capabilities in
+ * addition to the system capabilities calculated by the framework.
+ *
+ * <p>
+ * The value of this property may be retrieved by calling the
+ * {@code BundleContext.getProperty} method.
+ *
+ * @see #FRAMEWORK_SYSTEMCAPABILITIES
+ * @since 1.6
+ */
+ String FRAMEWORK_SYSTEMCAPABILITIES_EXTRA = "org.osgi.framework.system.capabilities.extra";
+
+ /**
+ * Framework launching property specifying whether multiple bundles having
+ * the same {@link #BUNDLE_SYMBOLICNAME symbolic name} and
+ * {@link #BUNDLE_VERSION version} may be installed.
+ *
+ * <p>
+ * Default value is {@link #FRAMEWORK_BSNVERSION_SINGLE single} in this
+ * release of the specification. This default may change to
+ * {@link #FRAMEWORK_BSNVERSION_MULTIPLE multiple} in a future specification
+ * release. Therefore, code must not assume the default behavior is
+ * {@code single} and should interrogate the value of this property to
+ * determine the behavior.
+ *
+ * <p>
+ * The value of this property may be retrieved by calling the
+ * {@code BundleContext.getProperty} method.
+ *
+ * @see #FRAMEWORK_BSNVERSION_MULTIPLE
+ * @see #FRAMEWORK_BSNVERSION_SINGLE
+ * @since 1.6
+ */
+ String FRAMEWORK_BSNVERSION = "org.osgi.framework.bsnversion";
+
+ /**
+ * Specifies the framework will allow multiple bundles to be installed
+ * having the same symbolic name and version.
+ *
+ * @since 1.6
+ * @see #FRAMEWORK_BSNVERSION
+ */
+ String FRAMEWORK_BSNVERSION_MULTIPLE = "multiple";
+
+ /**
+ * Specifies the framework will only allow a single bundle to be installed
+ * for a given symbolic name and version. It will be an error to install a
+ * bundle or update a bundle to have the same symbolic name and version as
+ * another installed bundle.
+ *
+ * @since 1.6
+ * @see #FRAMEWORK_BSNVERSION
*/
- public static final String SERVICE_DESCRIPTION = "service.description";
+ String FRAMEWORK_BSNVERSION_SINGLE = "single";
}
Modified: felix/trunk/framework/src/main/java/org/osgi/framework/Filter.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/osgi/framework/Filter.java?rev=1104564&r1=1104563&r2=1104564&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/framework/Filter.java (original)
+++ felix/trunk/framework/src/main/java/org/osgi/framework/Filter.java Tue May 17 21:20:32 2011
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2010). 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.
@@ -16,17 +16,16 @@
package org.osgi.framework;
import java.util.Dictionary;
+import java.util.Map;
/**
- * An RFC 1960-based Filter.
+ * An <a href="http://www.ietf.org/rfc/rfc1960.txt">RFC 1960</a>-based Filter.
* <p>
- * <code>Filter</code>s can be created by calling
- * {@link BundleContext#createFilter} or {@link FrameworkUtil#createFilter} with
- * a filter string.
+ * {@code Filter}s can be created by calling {@link BundleContext#createFilter}
+ * or {@link FrameworkUtil#createFilter} with a filter string.
* <p>
- * 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>.
+ * A {@code Filter} can be used numerous times to determine if the match
+ * argument matches the filter string that was used to create the {@code Filter}.
* <p>
* Some examples of LDAP filters are:
*
@@ -38,86 +37,100 @@ import java.util.Dictionary;
* </pre>
*
* @since 1.1
- * @see "Core Specification, section 5.5, for a description of the filter string syntax."
+ * @see "Core Specification, Filters, for a description of the filter string syntax."
* @ThreadSafe
- * @version $Revision: 6860 $
+ * @noimplement
+ * @version $Id: 4d21267f4b85d1912d73f7e2c049cc968c4237f9 $
*/
public interface Filter {
/**
* Filter using a service's properties.
* <p>
- * 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>.
+ * This {@code Filter} is executed using the keys and values of the
+ * referenced service's properties. The keys are looked up in a case
+ * insensitive manner.
*
* @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
- * <code>Filter</code>; <code>false</code> otherwise.
+ * @return {@code true} if the service's properties match this
+ * {@code Filter}; {@code false} otherwise.
*/
- public boolean match(ServiceReference reference);
+ boolean match(ServiceReference< ? > reference);
/**
- * 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>.
+ * Filter using a {@code Dictionary} with case insensitive key lookup. This
+ * {@code Filter} is executed using the specified {@code Dictionary}'s keys
+ * and values. The keys are looked up in a case insensitive manner.
*
- * @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
+ * @param dictionary The {@code Dictionary} whose key/value pairs are used
+ * in the match.
+ * @return {@code true} if the {@code Dictionary}'s values match this
+ * filter; {@code false} otherwise.
+ * @throws IllegalArgumentException If {@code dictionary} contains case
* variants of the same key name.
*/
- public boolean match(Dictionary dictionary);
+ boolean match(Dictionary<String, ? > dictionary);
/**
- * Returns this <code>Filter</code>'s filter string.
+ * Returns this {@code Filter}'s filter string.
* <p>
* The filter string is normalized by removing whitespace which does not
* affect the meaning of the filter.
*
- * @return This <code>Filter</code>'s filter string.
+ * @return This {@code Filter}'s filter string.
*/
- public String toString();
+ String toString();
/**
- * Compares this <code>Filter</code> to another <code>Filter</code>.
+ * Compares this {@code Filter} to another {@code Filter}.
*
* <p>
- * This method returns the result of calling
- * <code>this.toString().equals(obj.toString())</code>.
+ * This implementation returns the result of calling
+ * {@code this.toString().equals(obj.toString())}.
*
- * @param obj The object to compare against this <code>Filter</code>.
- * @return If the other object is a <code>Filter</code> object, then returns
+ * @param obj The object to compare against this {@code Filter}.
+ * @return If the other object is a {@code Filter} object, then returns
* the result of calling
- * <code>this.toString().equals(obj.toString())</code>;
- * <code>false</code> otherwise.
+ * {@code this.toString().equals(obj.toString())};
+ * {@code false} otherwise.
*/
- public boolean equals(Object obj);
+ boolean equals(Object obj);
/**
- * Returns the hashCode for this <code>Filter</code>.
+ * Returns the hashCode for this {@code Filter}.
*
* <p>
- * This method returns the result of calling
- * <code>this.toString().hashCode()</code>.
+ * This implementation returns the result of calling
+ * {@code this.toString().hashCode()}.
*
- * @return The hashCode of this <code>Filter</code>.
+ * @return The hashCode of this {@code Filter}.
*/
- public int hashCode();
+ int hashCode();
/**
- * 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>.
+ * Filter using a {@code Dictionary}. This {@code Filter} is executed using
+ * the specified {@code Dictionary}'s keys and values. The keys are looked
+ * up in a normal manner respecting case.
*
- * @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.
+ * @param dictionary The {@code Dictionary} whose key/value pairs are used
+ * in the match.
+ * @return {@code true} if the {@code Dictionary}'s values match this
+ * filter; {@code false} otherwise.
* @since 1.3
*/
- public boolean matchCase(Dictionary dictionary);
+ boolean matchCase(Dictionary<String, ? > dictionary);
+
+ /**
+ * Filter using a {@code Map}. This {@code Filter} is executed using the
+ * specified {@code Map}'s keys and values. The keys are looked up in a
+ * normal manner respecting case.
+ *
+ * @param map The {@code Map} whose key/value pairs are used in the match.
+ * Maps with {@code null} key or values are not supported. A
+ * {@code null} value is considered not present to the filter.
+ * @return {@code true} if the {@code Map}'s values match this filter;
+ * {@code false} otherwise.
+ * @since 1.6
+ */
+ boolean matches(Map<String, ? > map);
}
Modified: felix/trunk/framework/src/main/java/org/osgi/framework/FrameworkEvent.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/osgi/framework/FrameworkEvent.java?rev=1104564&r1=1104563&r2=1104564&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/framework/FrameworkEvent.java (original)
+++ felix/trunk/framework/src/main/java/org/osgi/framework/FrameworkEvent.java Tue May 17 21:20:32 2011
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -18,12 +18,15 @@ package org.osgi.framework;
import java.util.EventObject;
+import org.osgi.framework.startlevel.FrameworkStartLevel;
+import org.osgi.framework.wiring.FrameworkWiring;
+
/**
* A general event from the Framework.
*
* <p>
- * <code>FrameworkEvent</code> objects are delivered to
- * <code>FrameworkListener</code>s when a general event occurs within the OSGi
+ * {@code FrameworkEvent} objects are delivered to
+ * {@code FrameworkListener}s when a general event occurs within the OSGi
* environment. A type code is used to identify the event type for future
* extendability.
*
@@ -32,7 +35,7 @@ import java.util.EventObject;
*
* @Immutable
* @see FrameworkListener
- * @version $Revision: 6542 $
+ * @version $Id: e05c6ffd542fa432835961882bf6b15b0620ffb6 $
*/
public class FrameworkEvent extends EventObject {
@@ -61,7 +64,7 @@ public class FrameworkEvent extends Even
* has reached the initial start level. The source of this event is the
* System Bundle.
*
- * @see "The Start Level Service"
+ * @see "The Start Level Specification"
*/
public final static int STARTED = 0x00000001;
@@ -74,20 +77,21 @@ public class FrameworkEvent extends Even
public final static int ERROR = 0x00000002;
/**
- * A PackageAdmin.refreshPackage operation has completed.
+ * A FrameworkWiring.refreshBundles operation has completed.
*
* <p>
- * This event is fired when the Framework has completed the refresh packages
- * operation initiated by a call to the PackageAdmin.refreshPackages method.
- * The source of this event is the System Bundle.
+ * This event is fired when the Framework has completed the refresh bundles
+ * operation initiated by a call to the FrameworkWiring.refreshBundles
+ * method. The source of this event is the System Bundle.
*
* @since 1.2
- * @see "<code>PackageAdmin.refreshPackages</code>"
+ * @see FrameworkWiring#refreshBundles(java.util.Collection,
+ * FrameworkListener...)
*/
public final static int PACKAGES_REFRESHED = 0x00000004;
/**
- * A StartLevel.setStartLevel operation has completed.
+ * A FrameworkStartLevel.setStartLevel operation has completed.
*
* <p>
* This event is fired when the Framework has completed changing the active
@@ -95,7 +99,7 @@ public class FrameworkEvent extends Even
* The source of this event is the System Bundle.
*
* @since 1.2
- * @see "The Start Level Service"
+ * @see FrameworkStartLevel#setStartLevel(int, FrameworkListener...)
*/
public final static int STARTLEVEL_CHANGED = 0x00000008;
@@ -170,7 +174,7 @@ public class FrameworkEvent extends Even
* Creates a Framework event.
*
* @param type The event type.
- * @param source The event source object. This may not be <code>null</code>.
+ * @param source The event source object. This may not be {@code null}.
* @deprecated As of 1.2. This constructor is deprecated in favor of using
* the other constructor with the System Bundle as the event
* source.
@@ -188,7 +192,7 @@ public class FrameworkEvent extends Even
* @param type The event type.
* @param bundle The event source.
* @param throwable The related exception. This argument may be
- * <code>null</code> if there is no related exception.
+ * {@code null} if there is no related exception.
*/
public FrameworkEvent(int type, Bundle bundle, Throwable throwable) {
super(bundle);
@@ -200,7 +204,7 @@ public class FrameworkEvent extends Even
/**
* Returns the exception related to this event.
*
- * @return The related exception or <code>null</code> if none.
+ * @return The related exception or {@code null} if none.
*/
public Throwable getThrowable() {
return throwable;
Modified: felix/trunk/framework/src/main/java/org/osgi/framework/FrameworkListener.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/osgi/framework/FrameworkListener.java?rev=1104564&r1=1104563&r2=1104564&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/framework/FrameworkListener.java (original)
+++ felix/trunk/framework/src/main/java/org/osgi/framework/FrameworkListener.java Tue May 17 21:20:32 2011
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2010). 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.
@@ -19,31 +19,31 @@ package org.osgi.framework;
import java.util.EventListener;
/**
- * A <code>FrameworkEvent</code> listener. <code>FrameworkListener</code> is
+ * A {@code FrameworkEvent} listener. {@code FrameworkListener} is
* a listener interface that may be implemented by a bundle developer. When a
- * <code>FrameworkEvent</code> is fired, it is asynchronously delivered to a
- * <code>FrameworkListener</code>. The Framework delivers
- * <code>FrameworkEvent</code> objects to a <code>FrameworkListener</code>
- * in order and must not concurrently call a <code>FrameworkListener</code>.
+ * {@code FrameworkEvent} is fired, it is asynchronously delivered to a
+ * {@code FrameworkListener}. The Framework delivers
+ * {@code FrameworkEvent} objects to a {@code FrameworkListener}
+ * in order and must not concurrently call a {@code FrameworkListener}.
*
* <p>
- * A <code>FrameworkListener</code> object is registered with the Framework
+ * A {@code FrameworkListener} object is registered with the Framework
* using the {@link BundleContext#addFrameworkListener} method.
- * <code>FrameworkListener</code> objects are called with a
- * <code>FrameworkEvent</code> objects when the Framework starts and when
+ * {@code FrameworkListener} objects are called with a
+ * {@code FrameworkEvent} objects when the Framework starts and when
* asynchronous errors occur.
*
* @see FrameworkEvent
* @NotThreadSafe
- * @version $Revision: 5673 $
+ * @version $Id: a32e7599ea09d3510759d77e824cb8d9eff67f9d $
*/
public interface FrameworkListener extends EventListener {
/**
- * Receives notification of a general <code>FrameworkEvent</code> object.
+ * Receives notification of a general {@code FrameworkEvent} object.
*
- * @param event The <code>FrameworkEvent</code> object.
+ * @param event The {@code FrameworkEvent} object.
*/
public void frameworkEvent(FrameworkEvent event);
}