felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r703448 - in /felix/trunk: framework/ framework/src/main/java/org/apache/felix/framework/ framework/src/main/java/org/apache/felix/framework/cache/ framework/src/main/java/org/osgi/framework/ framework/src/main/java/org/osgi/framework/launc...
Date Fri, 10 Oct 2008 13:12:45 GMT
Author: rickhall
Date: Fri Oct 10 06:12:44 2008
New Revision: 703448

URL: http://svn.apache.org/viewvc?rev=703448&view=rev
Log:
More changes for implementing framework API. (FELIX-753)

Added:
    felix/trunk/framework/src/main/java/org/osgi/framework/Constants.java
    felix/trunk/framework/src/main/java/org/osgi/framework/FrameworkEvent.java
    felix/trunk/framework/src/main/java/org/osgi/framework/launch/
    felix/trunk/framework/src/main/java/org/osgi/framework/launch/SystemBundle.java
      - copied, changed from r703438, felix/trunk/framework/src/main/java/org/osgi/framework/SystemBundle.java
Removed:
    felix/trunk/framework/src/main/java/org/osgi/framework/SystemBundle.java
Modified:
    felix/trunk/framework/pom.xml
    felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
    felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java
    felix/trunk/main/pom.xml
    felix/trunk/main/src/main/java/org/apache/felix/main/Main.java

Modified: felix/trunk/framework/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/framework/pom.xml?rev=703448&r1=703447&r2=703448&view=diff
==============================================================================
--- felix/trunk/framework/pom.xml (original)
+++ felix/trunk/framework/pom.xml Fri Oct 10 06:12:44 2008
@@ -53,7 +53,7 @@
             <Bundle-Name>Apache Felix Framework</Bundle-Name>
             <Bundle-Description>OSGi R4 framework implementation.</Bundle-Description>
             <Bundle-Vendor>The Apache Software Foundation</Bundle-Vendor>
-            <Export-Package>org.osgi.framework;-split-package:=merge-first,org.osgi.service.packageadmin,org.osgi.service.url,org.osgi.service.startlevel,org.osgi.util.tracker</Export-Package>
+            <Export-Package>org.osgi.framework;-split-package:=merge-first,org.osgi.framework.launch,org.osgi.service.packageadmin,org.osgi.service.url,org.osgi.service.startlevel,org.osgi.util.tracker</Export-Package>
             <Private-Package>org.apache.felix.moduleloader.*,org.apache.felix.framework.*</Private-Package>
             <Import-Package>!*</Import-Package>
             <Include-Resource>META-INF/LICENSE=LICENSE,META-INF/NOTICE=NOTICE,{src/main/resources/},org/osgi/framework/=target/classes/org/osgi/framework/</Include-Resource> 

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java?rev=703448&r1=703447&r2=703448&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java Fri Oct 10 06:12:44 2008
@@ -18,6 +18,7 @@
  */
 package org.apache.felix.framework;
 
+import org.osgi.framework.launch.SystemBundle;
 import java.io.*;
 import java.net.*;
 import java.security.*;
@@ -924,8 +925,14 @@
      * @param timeout A timeout value.
      * @throws java.lang.InterruptedException If the thread was interrupted.
     **/
-    public void waitForStop(long timeout) throws InterruptedException
+    public FrameworkEvent waitForStop(long timeout) throws InterruptedException
     {
+        // Throw exception if timeout is negative.
+        if (timeout < 0)
+        {
+            throw new IllegalArgumentException("Timeout cannot be negative.");
+        }
+
         // If there is a gate, wait on it; otherwise, return immediately.
         ThreadGate gate;
         synchronized (this)
@@ -937,6 +944,11 @@
         {
             gate.await(timeout);
         }
+
+        // TODO: RFC132 - We need to modify this to return the proper reason:
+        //       FrameEvent.STOPPED, FrameEvent.STOPPED_UPDATE,
+        //       FrameEvent.STOPPED_BOOTCLASSPATH_MODIFIED, FrameEvent.ERROR
+        return new FrameworkEvent(FrameworkEvent.STOPPED, this, null);
     }
 
     public void uninstall() throws BundleException

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java?rev=703448&r1=703447&r2=703448&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java Fri Oct 10 06:12:44 2008
@@ -23,7 +23,7 @@
 
 import org.apache.felix.framework.Logger;
 import org.apache.felix.framework.util.SecureAction;
-import org.osgi.framework.SystemBundle;
+import org.osgi.framework.Constants;
 
 /**
  * <p>
@@ -301,7 +301,7 @@
 
         // Check to see if the cache directory is specified in the storage
         // configuration property.
-        String cacheDirStr = (String) m_configMap.get(SystemBundle.FRAMEWORK_STORAGE_PROP);
+        String cacheDirStr = (String) m_configMap.get(Constants.FRAMEWORK_STORAGE);
         // Get the cache root directory for relative paths; the default is ".".
         String rootDirStr = (String) m_configMap.get(CACHE_ROOTDIR_PROP);
         rootDirStr = (rootDirStr == null) ? CACHE_ROOTDIR_DEFAULT : rootDirStr;

Added: 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=703448&view=auto
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/framework/Constants.java (added)
+++ felix/trunk/framework/src/main/java/org/osgi/framework/Constants.java Fri Oct 10 06:12:44 2008
@@ -0,0 +1,1267 @@
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.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>java.lang.String</code>, unless otherwise indicated.
+ * 
+ * @since 1.1
+ * @version $Revision: 5684 $
+ */
+
+public interface Constants {
+	/**
+	 * Location identifier of the OSGi <i>system bundle </i>, which is defined
+	 * to be &quot;System Bundle&quot;.
+	 */
+	public static final String	SYSTEM_BUNDLE_LOCATION					= "System Bundle";
+
+	/**
+	 * Alias for the symbolic name of the OSGi <i>system bundle </i>. It is
+	 * defined to be &quot;system.bundle&quot;.
+	 * 
+	 * @since 1.3
+	 */
+	public static final String	SYSTEM_BUNDLE_SYMBOLICNAME				= "system.bundle";
+
+	/**
+	 * Manifest header (named &quot;Bundle-Category&quot;) 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.
+	 */
+	public static final String	BUNDLE_CATEGORY							= "Bundle-Category";
+
+	/**
+	 * Manifest header (named &quot;Bundle-ClassPath&quot;) 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.
+	 */
+	public static final String	BUNDLE_CLASSPATH						= "Bundle-ClassPath";
+
+	/**
+	 * Manifest header (named &quot;Bundle-Copyright&quot;) 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.
+	 */
+	public static final String	BUNDLE_COPYRIGHT						= "Bundle-Copyright";
+
+	/**
+	 * Manifest header (named &quot;Bundle-Description&quot;) 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.
+	 */
+	public static final String	BUNDLE_DESCRIPTION						= "Bundle-Description";
+
+	/**
+	 * Manifest header (named &quot;Bundle-Name&quot;) 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.
+	 */
+	public static final String	BUNDLE_NAME								= "Bundle-Name";
+
+	/**
+	 * Manifest header (named &quot;Bundle-NativeCode&quot;) 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>
+	 * object returned by the <code>Bundle.getHeaders</code> method.
+	 */
+	public static final String	BUNDLE_NATIVECODE						= "Bundle-NativeCode";
+
+	/**
+	 * Manifest header (named &quot;Export-Package&quot;) 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.
+	 */
+	public static final String	EXPORT_PACKAGE							= "Export-Package";
+
+	/**
+	 * Manifest header (named &quot;Export-Service&quot;) 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>
+	 * object returned by the <code>Bundle.getHeaders</code> method.
+	 * 
+	 * @deprecated As of 1.2.
+	 */
+	public static final String	EXPORT_SERVICE							= "Export-Service";
+
+	/**
+	 * Manifest header (named &quot;Import-Package&quot;) 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.
+	 */
+	public static final String	IMPORT_PACKAGE							= "Import-Package";
+
+	/**
+	 * Manifest header (named &quot;DynamicImport-Package&quot;) 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.
+	 * 
+	 * @since 1.2
+	 */
+	public static final String	DYNAMICIMPORT_PACKAGE					= "DynamicImport-Package";
+
+	/**
+	 * Manifest header (named &quot;Import-Service&quot;) 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.
+	 * 
+	 * @deprecated As of 1.2.
+	 */
+	public static final String	IMPORT_SERVICE							= "Import-Service";
+
+	/**
+	 * Manifest header (named &quot;Bundle-Vendor&quot;) 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.
+	 */
+	public static final String	BUNDLE_VENDOR							= "Bundle-Vendor";
+
+	/**
+	 * Manifest header (named &quot;Bundle-Version&quot;) 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.
+	 */
+	public static final String	BUNDLE_VERSION							= "Bundle-Version";
+
+	/**
+	 * Manifest header (named &quot;Bundle-DocURL&quot;) 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.
+	 */
+	public static final String	BUNDLE_DOCURL							= "Bundle-DocURL";
+
+	/**
+	 * Manifest header (named &quot;Bundle-ContactAddress&quot;) 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.
+	 */
+	public static final String	BUNDLE_CONTACTADDRESS					= "Bundle-ContactAddress";
+
+	/**
+	 * Manifest header attribute (named &quot;Bundle-Activator&quot;)
+	 * 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.
+	 * 
+	 * <p>
+	 * The attribute value may be retrieved from the <code>Dictionary</code>
+	 * object returned by the <code>Bundle.getHeaders</code> method.
+	 */
+	public static final String	BUNDLE_ACTIVATOR						= "Bundle-Activator";
+
+	/**
+	 * Manifest header (named &quot;Bundle-UpdateLocation&quot;) 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.
+	 */
+	public static final String	BUNDLE_UPDATELOCATION					= "Bundle-UpdateLocation";
+
+	/**
+	 * Manifest header attribute (named &quot;specification-version&quot;)
+	 * 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}.
+	 */
+	public static final String	PACKAGE_SPECIFICATION_VERSION			= "specification-version";
+
+	/**
+	 * Manifest header attribute (named &quot;processor&quot;) 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
+	 * like:
+	 * 
+	 * <pre>
+	 *     Bundle-NativeCode: http.so ; processor=x86 ...
+	 * </pre>
+	 */
+	public static final String	BUNDLE_NATIVECODE_PROCESSOR				= "processor";
+
+	/**
+	 * Manifest header attribute (named &quot;osname&quot;) 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:
+	 * 
+	 * <pre>
+	 *     Bundle-NativeCode: http.so ; osname=Linux ...
+	 * </pre>
+	 */
+	public static final String	BUNDLE_NATIVECODE_OSNAME				= "osname";
+
+	/**
+	 * Manifest header attribute (named &quot;osversion&quot;) 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:
+	 * 
+	 * <pre>
+	 *     Bundle-NativeCode: http.so ; osversion=&quot;2.34&quot; ...
+	 * </pre>
+	 */
+	public static final String	BUNDLE_NATIVECODE_OSVERSION				= "osversion";
+
+	/**
+	 * Manifest header attribute (named &quot;language&quot;) 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:
+	 * 
+	 * <pre>
+	 *     Bundle-NativeCode: http.so ; language=nl_be ...
+	 * </pre>
+	 */
+	public static final String	BUNDLE_NATIVECODE_LANGUAGE				= "language";
+
+	/**
+	 * Manifest header (named &quot;Bundle-RequiredExecutionEnvironment&quot;)
+	 * 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>
+	 * object returned by the <code>Bundle.getHeaders</code> method.
+	 * 
+	 * @since 1.2
+	 */
+	public static final String	BUNDLE_REQUIREDEXECUTIONENVIRONMENT		= "Bundle-RequiredExecutionEnvironment";
+
+	/*
+	 * Framework environment properties.
+	 */
+
+	/**
+	 * Framework environment property (named
+	 * &quot;org.osgi.framework.version&quot;) 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
+	 * &quot;org.osgi.framework.vendor&quot;) 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
+	 * &quot;org.osgi.framework.language&quot;) 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
+	 * &quot;org.osgi.framework.os.name&quot;) 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
+	 * &quot;org.osgi.framework.os.version&quot;) 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
+	 * &quot;org.osgi.framework.processor&quot;) 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
+	 * &quot;org.osgi.framework.executionenvironment&quot;) 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
+	 * &quot;org.osgi.framework.bootdelegation&quot;) 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
+	 * &quot;org.osgi.framework.system.packages&quot;) 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 (named
+	 * &quot;org.osgi.framework.system.packages.extra&quot;) 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 org.osgi.framework.system.packages
+	 * @since 1.5
+	 */
+	public static final String	FRAMEWORK_SYSTEMPACKAGES_EXTRA			= "org.osgi.framework.system.packages.extra";
+	/**
+	 * Framework environment property (named
+	 * &quot;org.osgi.supports.framework.extension&quot;) 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
+	 * &quot;org.osgi.supports.bootclasspath.extension&quot;) 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
+	 * &quot;org.osgi.supports.framework.fragment&quot;) 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
+	 * &quot;org.osgi.supports.framework.requirebundle&quot;) 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 &quot;objectClass&quot;) 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 &quot;service.id&quot;) 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 &quot;service.pid&quot;) 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 &quot;service.ranking&quot;) 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 &quot;service.type&quot;) to provide information
+	 * about the type of the service. For example, if this service is proxied,
+	 * the property value might contain a string such as &quot;proxied&quot;.
+	 * 
+	 * <p>
+	 * The OSGi Alliance reserves all property value strings that start with
+	 * &quot;osgi.&quot;.
+	 * 
+	 * <p>
+	 * This property may be supplied in the properties <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>.
+	 * 
+	 * @since 1.5
+	 */
+	public static final String	SERVICE_TYPE							= "service.type";
+	
+	/**
+	 * Service property (named &quot;service.vendor&quot;) 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 (named &quot;service.description&quot;) 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 &quot;Bundle-SymbolicName&quot;) 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.
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	BUNDLE_SYMBOLICNAME						= "Bundle-SymbolicName";
+
+	/**
+	 * Manifest header directive (named &quot;singleton&quot;) 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
+	 * like:
+	 * 
+	 * <pre>
+	 *     Bundle-SymbolicName: com.acme.module.test; singleton:=true
+	 * </pre>
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	SINGLETON_DIRECTIVE						= "singleton";
+
+	/**
+	 * Manifest header directive (named &quot;fragment-attachment&quot;)
+	 * identifying if and when a fragment may attach to a host bundle. The
+	 * default value is <code>&quot;always&quot;</code>.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Bundle-SymbolicName manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Bundle-SymbolicName: com.acme.module.test; fragment-attachment:=&quot;never&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#FRAGMENT_ATTACHMENT_ALWAYS
+	 * @see Constants#FRAGMENT_ATTACHMENT_RESOLVETIME
+	 * @see Constants#FRAGMENT_ATTACHMENT_NEVER
+	 * @since 1.3
+	 */
+	public final static String	FRAGMENT_ATTACHMENT_DIRECTIVE			= "fragment-attachment";
+
+	/**
+	 * Manifest header directive value (named &quot;always&quot;) 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
+	 * like:
+	 * 
+	 * <pre>
+	 *     Bundle-SymbolicName: com.acme.module.test; fragment-attachment:=&quot;always&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#FRAGMENT_ATTACHMENT_DIRECTIVE
+	 * @since 1.3
+	 */
+	public final static String	FRAGMENT_ATTACHMENT_ALWAYS				= "always";
+
+	/**
+	 * Manifest header directive value (named &quot;resolve-time&quot;)
+	 * 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
+	 * like:
+	 * 
+	 * <pre>
+	 *     Bundle-SymbolicName: com.acme.module.test; fragment-attachment:=&quot;resolve-time&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#FRAGMENT_ATTACHMENT_DIRECTIVE
+	 * @since 1.3
+	 */
+	public final static String	FRAGMENT_ATTACHMENT_RESOLVETIME			= "resolve-time";
+
+	/**
+	 * Manifest header directive value (named &quot;never&quot;) 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
+	 * like:
+	 * 
+	 * <pre>
+	 *     Bundle-SymbolicName: com.acme.module.test; fragment-attachment:=&quot;never&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#FRAGMENT_ATTACHMENT_DIRECTIVE
+	 * @since 1.3
+	 */
+	public final static String	FRAGMENT_ATTACHMENT_NEVER				= "never";
+
+	/**
+	 * Manifest header (named &quot;Bundle-Localization&quot;) 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.
+	 * 
+	 * @see #BUNDLE_LOCALIZATION_DEFAULT_BASENAME
+	 * @since 1.3
+	 */
+	public final static String	BUNDLE_LOCALIZATION						= "Bundle-Localization";
+
+	/**
+	 * Default value for the <code>Bundle-Localization</code> manifest header.
+	 * 
+	 * @see #BUNDLE_LOCALIZATION
+	 * @since 1.3
+	 */
+	public final static String	BUNDLE_LOCALIZATION_DEFAULT_BASENAME	= "OSGI-INF/l10n/bundle";
+
+	/**
+	 * Manifest header (named &quot;Require-Bundle&quot;) 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.
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	REQUIRE_BUNDLE							= "Require-Bundle";
+
+	/**
+	 * Manifest header attribute (named &quot;bundle-version&quot;) 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>.
+	 * 
+	 * <p>
+	 * The attribute value is encoded in the Require-Bundle manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Require-Bundle: com.acme.module.test; bundle-version=&quot;1.1&quot;
+	 *     Require-Bundle: com.acme.module.test; bundle-version=&quot;[1.0,2.0)&quot;
+	 * </pre>
+	 * 
+	 * <p>
+	 * The bundle-version attribute value uses a mathematical interval notation
+	 * to specify a range of bundle versions. A bundle-version attribute value
+	 * specified as a single version means a version range that includes any
+	 * bundle version greater than or equal to the specified version.
+	 * 
+	 * @since 1.3
+	 */
+	public static final String	BUNDLE_VERSION_ATTRIBUTE				= "bundle-version";
+
+	/**
+	 * Manifest header (named &quot;Fragment-Host&quot;) 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.
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	FRAGMENT_HOST							= "Fragment-Host";
+
+	/**
+	 * Manifest header attribute (named &quot;selection-filter&quot;) is used
+	 * for selection by filtering based upon system properties.
+	 * 
+	 * <p>
+	 * The attribute value is encoded in manifest headers like:
+	 * 
+	 * <pre>
+	 *     Bundle-NativeCode: libgtk.so; selection-filter=&quot;(ws=gtk)&quot;; ...
+	 * </pre>
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	SELECTION_FILTER_ATTRIBUTE				= "selection-filter";
+
+	/**
+	 * Manifest header (named &quot;Bundle-ManifestVersion&quot;) 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.
+	 * <p>
+	 * The bundle manifest version defined by OSGi R4 or, more specifically, by
+	 * V1.3 of the OSGi Framework Specification is "2".
+	 * 
+	 * <p>
+	 * The attribute value may be retrieved from the <code>Dictionary</code>
+	 * object returned by the <code>Bundle.getHeaders</code> method.
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	BUNDLE_MANIFESTVERSION					= "Bundle-ManifestVersion";
+
+	/**
+	 * Manifest header attribute (named &quot;version&quot;) 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
+	 * manifest header like:
+	 * 
+	 * <pre>
+	 *     Import-Package: org.osgi.framework; version=&quot;1.1&quot;
+	 * </pre>
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	VERSION_ATTRIBUTE						= "version";
+
+	/**
+	 * Manifest header attribute (named &quot;bundle-symbolic-name&quot;)
+	 * 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
+	 * like:
+	 * 
+	 * <pre>
+	 *     Import-Package: org.osgi.framework; bundle-symbolic-name=&quot;com.acme.module.test&quot;
+	 * </pre>
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	BUNDLE_SYMBOLICNAME_ATTRIBUTE			= "bundle-symbolic-name";
+
+	/**
+	 * Manifest header directive (named &quot;resolution&quot;) identifying the
+	 * resolution type in the Import-Package or Require-Bundle manifest header.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Import-Package or Require-Bundle
+	 * manifest header like:
+	 * 
+	 * <pre>
+	 *     Import-Package: org.osgi.framework; resolution:=&quot;optional&quot;
+	 *     Require-Bundle: com.acme.module.test; resolution:=&quot;optional&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#RESOLUTION_MANDATORY
+	 * @see Constants#RESOLUTION_OPTIONAL
+	 * @since 1.3
+	 */
+	public final static String	RESOLUTION_DIRECTIVE					= "resolution";
+
+	/**
+	 * Manifest header directive value (named &quot;mandatory&quot;) 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
+	 * manifest header like:
+	 * 
+	 * <pre>
+	 *     Import-Package: org.osgi.framework; resolution:=&quot;manditory&quot;
+	 *     Require-Bundle: com.acme.module.test; resolution:=&quot;manditory&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#RESOLUTION_DIRECTIVE
+	 * @since 1.3
+	 */
+	public final static String	RESOLUTION_MANDATORY					= "mandatory";
+
+	/**
+	 * Manifest header directive value (named &quot;optional&quot;) 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
+	 * manifest header like:
+	 * 
+	 * <pre>
+	 *     Import-Package: org.osgi.framework; resolution:=&quot;optional&quot;
+	 *     Require-Bundle: com.acme.module.test; resolution:=&quot;optional&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#RESOLUTION_DIRECTIVE
+	 * @since 1.3
+	 */
+	public final static String	RESOLUTION_OPTIONAL						= "optional";
+
+	/**
+	 * Manifest header directive (named &quot;uses&quot;) identifying a list of
+	 * packages that an exported package uses.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Export-Package manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Export-Package: org.osgi.util.tracker; uses:=&quot;org.osgi.framework&quot;
+	 * </pre>
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	USES_DIRECTIVE							= "uses";
+
+	/**
+	 * Manifest header directive (named &quot;include&quot;).
+	 * <p>
+	 * This directive is used by the Import-Package manifest header to identify
+	 * a list of classes of the specified package which must be allowed to be
+	 * exported. The directive value is encoded in the Import-Package manifest
+	 * header like:
+	 * 
+	 * <pre>
+	 *     Import-Package: org.osgi.framework; include:=&quot;MyClass*&quot;
+	 * </pre>
+	 * 
+	 * <p>
+	 * This directive is also used by the Bundle-ActivationPolicy manifest
+	 * header to identify the packages from which class loads will trigger lazy
+	 * activation. The directive value is encoded in the Bundle-ActivationPolicy
+	 * manifest header like:
+	 * 
+	 * <pre>
+	 *     Bundle-ActivationPolicy: lazy; include:=&quot;org.osgi.framework&quot;
+	 * </pre>
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	INCLUDE_DIRECTIVE						= "include";
+
+	/**
+	 * Manifest header directive (named &quot;exclude&quot;).
+	 * <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
+	 * be exported. The directive value is encoded in the Export-Package
+	 * manifest header like:
+	 * 
+	 * <pre>
+	 *     Export-Package: org.osgi.framework; exclude:=&quot;*Impl&quot;
+	 * </pre>
+	 * 
+	 * <p>
+	 * This directive is also used by the Bundle-ActivationPolicy manifest
+	 * header to identify the packages from which class loads will not trigger
+	 * lazy activation. The directive value is encoded in the
+	 * Bundle-ActivationPolicy manifest header like:
+	 * 
+	 * <pre>
+	 *     Bundle-ActivationPolicy: lazy; exclude:=&quot;org.osgi.framework&quot;
+	 * </pre>
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	EXCLUDE_DIRECTIVE						= "exclude";
+
+	/**
+	 * Manifest header directive (named &quot;mandatory&quot;) 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
+	 * like:
+	 * 
+	 * <pre>
+	 *     Export-Package: org.osgi.framework; mandatory:=&quot;bundle-symbolic-name&quot;
+	 * </pre>
+	 * 
+	 * @since 1.3
+	 */
+	public final static String	MANDATORY_DIRECTIVE						= "mandatory";
+
+	/**
+	 * Manifest header directive (named &quot;visibility&quot;) identifying the
+	 * visibility of a required bundle in the Require-Bundle manifest header.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Require-Bundle manifest header
+	 * like:
+	 * 
+	 * <pre>
+	 *     Require-Bundle: com.acme.module.test; visibility:=&quot;reexport&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#VISIBILITY_PRIVATE
+	 * @see Constants#VISIBILITY_REEXPORT
+	 * @since 1.3
+	 */
+	public final static String	VISIBILITY_DIRECTIVE					= "visibility";
+
+	/**
+	 * Manifest header directive value (named &quot;private&quot;) 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
+	 * like:
+	 * 
+	 * <pre>
+	 *     Require-Bundle: com.acme.module.test; visibility:=&quot;private&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#VISIBILITY_DIRECTIVE
+	 * @since 1.3
+	 */
+	public final static String	VISIBILITY_PRIVATE						= "private";
+
+	/**
+	 * Manifest header directive value (named &quot;reexport&quot;) 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
+	 * like:
+	 * 
+	 * <pre>
+	 *     Require-Bundle: com.acme.module.test; visibility:=&quot;reexport&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#VISIBILITY_DIRECTIVE
+	 * @since 1.3
+	 */
+	public final static String	VISIBILITY_REEXPORT						= "reexport";
+	/**
+	 * Manifest header directive (named &quot;extension&quot;) identifying the
+	 * type of the extension fragment.
+	 * 
+	 * <p>
+	 * The directive value is encoded in the Fragment-Host manifest header like:
+	 * 
+	 * <pre>
+	 *     Fragment-Host: system.bundle; extension:=&quot;framework&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#EXTENSION_FRAMEWORK
+	 * @see Constants#EXTENSION_BOOTCLASSPATH
+	 * @since 1.3
+	 */
+	public final static String	EXTENSION_DIRECTIVE						= "extension";
+
+	/**
+	 * Manifest header directive value (named &quot;framework&quot;) 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:
+	 * 
+	 * <pre>
+	 *     Fragment-Host: system.bundle; extension:=&quot;framework&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#EXTENSION_DIRECTIVE
+	 * @since 1.3
+	 */
+	public final static String	EXTENSION_FRAMEWORK						= "framework";
+
+	/**
+	 * Manifest header directive value (named &quot;bootclasspath&quot;)
+	 * 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:
+	 * 
+	 * <pre>
+	 *     Fragment-Host: system.bundle; extension:=&quot;bootclasspath&quot;
+	 * </pre>
+	 * 
+	 * @see Constants#EXTENSION_DIRECTIVE
+	 * @since 1.3
+	 */
+	public final static String	EXTENSION_BOOTCLASSPATH					= "bootclasspath";
+
+	/**
+	 * Manifest header (named &quot;Bundle-ActivationPolicy&quot;) 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
+	 */
+	public final static String	BUNDLE_ACTIVATIONPOLICY					= "Bundle-ActivationPolicy";
+
+	/**
+	 * Bundle activation policy (named &quot;lazy&quot;) 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.
+	 * <p>
+	 * The activation policy value is specified as in the
+	 * Bundle-ActivationPolicy manifest header like:
+	 * 
+	 * <pre>
+	 *       Bundle-ActivationPolicy: lazy
+	 * </pre>
+	 * 
+	 * @see Constants#BUNDLE_ACTIVATIONPOLICY
+	 * @see Bundle#start(int)
+	 * @see Bundle#START_ACTIVATION_POLICY
+	 * @since 1.4
+	 */
+	public final static String	ACTIVATION_LAZY							= "lazy";
+
+	/**
+	 * Specifies the type of security manager the framework must use. If not
+	 * specified then the framework will not set the VM security manager. The
+	 * following types are defined:
+	 * <ul>
+	 * <li> osgi - Enables a security manager that supports all security aspects
+	 * of the OSGi R4 specification (including postponed conditions).</li>
+	 * </ul>
+	 * 
+	 * @since 1.5
+	 */
+	public final static String	FRAMEWORK_SECURITY						= "org.osgi.framework.security";
+
+	/**
+	 * 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 storage area for the framework should be
+	 * cleaned.  Default value is {@link #FRAMEWORK_STORAGE_CLEAN_NONE none}
+	 * @see #FRAMEWORK_STORAGE_CLEAN_NONE none
+	 * @see #FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT onFirstInit
+	 * @since 1.5
+	 */
+	public final static String	FRAMEWORK_STORAGE_CLEAN					= "org.osgi.framework.storage.clean";
+
+	/**
+	 * A framework configuration property value for 
+	 * {@link #FRAMEWORK_STORAGE_CLEAN org.osgi.framework.storage.clean} (named &quot;onFirstInit&quot;) identifying 
+	 * that the framework storage area will be cleaned before the system bundle
+	 * is initialized for the first time.  Subsequent inits, starts or updates of the 
+	 * system bundle will not result in cleaning the framework storage area.
+	 * 
+	 * @since 1.5
+	 */
+	public final static String  FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT			= "onFirstInit";
+
+	/**
+	 * A framework configuration property value for 
+	 * {@link #FRAMEWORK_STORAGE_CLEAN org.osgi.framework.storage.clean} (named &quot;none&quot;) identifying 
+	 * that the framework storage area should not be cleaned.
+	 * 
+	 * @since 1.5
+	 */
+	public final static String  FRAMEWORK_STORAGE_CLEAN_NONE			= "none";
+
+	/**
+	 * A comma separated list of additional library file extensions that must be
+	 * searched for when a bundle's class loader is searching for native
+	 * libraries. If 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 System.mapLibraryName(String)
+	 * 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 you could have
+	 * the following value:
+	 * 
+	 * <pre>
+	 * org.osgi.framework.command.execpermission = &quot;chmod +rx ${abspath}&quot;
+	 * </pre>
+	 * 
+	 * The ${abspath} is used to substitute the actual file path by the
+	 * framework.
+	 * 
+	 * @since 1.5
+	 */
+	public final static String	FRAMEWORK_EXECPERMISSION				= "org.osgi.framework.command.execpermission";
+
+	/**
+	 * This property is used to configure trust repositories for the
+	 * framework. The value is a <code>java.io.File#pathSeparator</code> separated list of
+	 * valid file paths in the file system to files that contain key stores of
+	 * type 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 
+	 * 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";
+}
\ No newline at end of file

Added: 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=703448&view=auto
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/framework/FrameworkEvent.java (added)
+++ felix/trunk/framework/src/main/java/org/osgi/framework/FrameworkEvent.java Fri Oct 10 06:12:44 2008
@@ -0,0 +1,254 @@
+/*
+ * Copyright (c) OSGi Alliance (2004, 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.framework;
+
+import java.util.EventObject;
+
+/**
+ * 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
+ * environment. A type code is used to identify the event type for future
+ * extendability.
+ * 
+ * <p>
+ * OSGi Alliance reserves the right to extend the set of event types.
+ * 
+ * @Immutable
+ * @see FrameworkListener
+ * @version $Revision: 5680 $
+ */
+
+public class FrameworkEvent extends EventObject {
+	static final long		serialVersionUID				= 207051004521261705L;
+	/**
+	 * Bundle related to the event.
+	 */
+	private final Bundle	bundle;
+
+	/**
+	 * Exception related to the event.
+	 */
+	private final Throwable	throwable;
+
+	/**
+	 * Type of event.
+	 */
+	private final int		type;
+
+	/**
+	 * The Framework has started.
+	 * 
+	 * <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 initial start level. The source of this event is the
+	 * System Bundle.
+	 * 
+	 * <p>
+	 * The value of <code>STARTED</code> is 0x00000001.
+	 * 
+	 * @see "<code>StartLevel</code>"
+	 */
+	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;
+
+	/**
+	 * A PackageAdmin.refreshPackage 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.
+	 * 
+	 * <p>
+	 * The value of <code>PACKAGES_REFRESHED</code> is 0x00000004.
+	 * 
+	 * @since 1.2
+	 * @see "<code>PackageAdmin.refreshPackages</code>"
+	 */
+	public final static int	PACKAGES_REFRESHED				= 0x00000004;
+
+	/**
+	 * A StartLevel.setStartLevel operation has completed.
+	 * 
+	 * <p>
+	 * This event is fired when the Framework has completed changing the active
+	 * start level initiated by a call to the StartLevel.setStartLevel method.
+	 * The source of this event is the System Bundle.
+	 * 
+	 * <p>
+	 * The value of <code>STARTLEVEL_CHANGED</code> is 0x00000008.
+	 * 
+	 * @since 1.2
+	 * @see "<code>StartLevel</code>"
+	 */
+	public final static int	STARTLEVEL_CHANGED				= 0x00000008;
+
+	/**
+	 * A warning has occurred.
+	 * 
+	 * <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;
+
+	/**
+	 * An informational event has occurred.
+	 * 
+	 * <p>
+	 * There was an informational event associated with a bundle.
+	 * 
+	 * <p>
+	 * The value of <code>INFO</code> is 0x00000020.
+	 * 
+	 * @since 1.3
+	 */
+	public final static int	INFO							= 0x00000020;
+
+	/**
+	 * The Framework has stopped.
+	 * 
+	 * <p>
+	 * 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.
+	 * 
+	 * <p>
+	 * The value of <code>STOPPED</code> is 0x00000040.
+	 * 
+	 * @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.
+	 * 
+	 * <p>
+	 * The value of <code>STOPPED_UPDATE</code> is 0x00000080.
+	 * 
+	 * @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.
+	 * 
+	 * <p>
+	 * The value of <code>STOPPED_BOOTCLASSPATH_MODIFIED</code> is 0x00000100.
+	 * 
+	 * @since 1.5
+	 */
+	public final static int	STOPPED_BOOTCLASSPATH_MODIFIED	= 0x00000100;
+
+	/**
+	 * Creates a Framework event.
+	 * 
+	 * @param type The event type.
+	 * @param source The event source object. This may not be <code>null</code>.
+	 * @deprecated As of 1.2. This constructor is deprecated in favor of using
+	 *             the other constructor with the System Bundle as the event
+	 *             source.
+	 */
+	public FrameworkEvent(int type, Object source) {
+		super(source);
+		this.type = type;
+		this.bundle = null;
+		this.throwable = null;
+	}
+
+	/**
+	 * Creates a Framework event regarding the specified bundle.
+	 * 
+	 * @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.
+	 */
+	public FrameworkEvent(int type, Bundle bundle, Throwable throwable) {
+		super(bundle);
+		this.type = type;
+		this.bundle = bundle;
+		this.throwable = throwable;
+	}
+
+	/**
+	 * Returns the exception related to this event.
+	 * 
+	 * @return The related exception or <code>null</code> if none.
+	 */
+	public Throwable getThrowable() {
+		return throwable;
+	}
+
+	/**
+	 * Returns the bundle associated with the event. This bundle is also the
+	 * source of the event.
+	 * 
+	 * @return The bundle associated with the event.
+	 */
+	public Bundle getBundle() {
+		return bundle;
+	}
+
+	/**
+	 * Returns the type of framework event.
+	 * <p>
+	 * The type values are:
+	 * <ul>
+	 * <li>{@link #STARTED}
+	 * <li>{@link #ERROR}
+	 * <li>{@link #WARNING}
+	 * <li>{@link #INFO}
+	 * <li>{@link #PACKAGES_REFRESHED}
+	 * <li>{@link #STARTLEVEL_CHANGED}
+	 * </ul>
+	 * 
+	 * @return The type of state change.
+	 */
+
+	public int getType() {
+		return type;
+	}
+}

Copied: felix/trunk/framework/src/main/java/org/osgi/framework/launch/SystemBundle.java (from r703438, felix/trunk/framework/src/main/java/org/osgi/framework/SystemBundle.java)
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/osgi/framework/launch/SystemBundle.java?p2=felix/trunk/framework/src/main/java/org/osgi/framework/launch/SystemBundle.java&p1=felix/trunk/framework/src/main/java/org/osgi/framework/SystemBundle.java&r1=703438&r2=703448&rev=703448&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/framework/SystemBundle.java (original)
+++ felix/trunk/framework/src/main/java/org/osgi/framework/launch/SystemBundle.java Fri Oct 10 06:12:44 2008
@@ -1,43 +1,328 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Copyright (c) OSGi Alliance (2008). All Rights Reserved.
  * 
- *   http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.framework.launch;
+
+import java.io.InputStream;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
+import org.osgi.framework.FrameworkEvent;
+
+/**
+ * The System Bundle for a Framework instance.
  * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * The <i>main</i> class of a framework implementation must implement this
+ * interface. The instantiator of the framework implementation class then has a
+ * System Bundle object and can then use the methods of this interface to manage
+ * and control the created framework instance.
+ * 
+ * <p>
+ * The <i>main</i> class of a framework implementation must provide a public
+ * constructor that takes a single argument of type <code>Map</code>. This
+ * configuration argument provides this System Bundle with framework properties
+ * to configure the framework instance. The framework instance must also examine
+ * the system properties for framework properties which are not set in the
+ * configuration argument. A framework property in the configuration argument
+ * with a <code>null</code> value indicates the framework property is
+ * <i>unset</i> and the system properties must not be examined for a value of
+ * the framework property. This allows the configuration argument to
+ * <i>unset</i> framework properties in the system properties .
+ * <p>
+ * If framework properties are not provided by the configuration argument or the
+ * system properties, this System Bundle must use some reasonable default
+ * configuration appropriate for the current VM. For example, the system
+ * packages for the current execution environment should be properly exported.
+ * The configuration argument may be <code>null</code>. The framework instance
+ * must copy any information needed from the configuration argument since the
+ * configuration argument can be changed after the framework instance has been
+ * created.
+ * 
+ * <p>
+ * A newly constructed System Bundle must be in the {@link #INSTALLED} state.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 5686 $
  */
-package org.osgi.framework;
+public interface SystemBundle extends Bundle {
+
+	/**
+	 * Initialize this System Bundle. After calling this method, this System
+	 * Bundle must:
+	 * <ul>
+	 * <li>Be in the {@link #STARTING} state.</li>
+	 * <li>Have a valid Bundle Context.</li>
+	 * <li>Have its framework instance be at start level 0.</li>
+	 * <li>Have event handling enabled in its framework instance.</li>
+	 * <li>Have reified Bundle objects for all bundles installed in its
+	 * framework instance.</li>
+	 * <li>Register framework services. For example, <code>PackageAdmin</code>,
+	 * <code>ConditionalPermissionAdmin</code>, <code>StartLevel</code>.</li>
+	 * </ul>
+	 * 
+	 * <p>
+	 * This System Bundle will not actually be started until {@link #start()
+	 * start} is called.
+	 * 
+	 * <p>
+	 * This method does nothing if called when this System Bundle is in the
+	 * {@link #STARTING}, {@link #ACTIVE} or {@link #STOPPING} states.
+	 * 
+	 * @throws BundleException If this System Bundle could not be initialized.
+	 */
+	public void init() throws BundleException;
+
+	/**
+	 * Wait until this System Bundle has completely stopped. The
+	 * <code>stop</code> and <code>update</code> methods on a System Bundle
+	 * performs an asynchronous stop of the System Bundle. This method can be
+	 * used to wait until the asynchronous stop of this System Bundle has
+	 * completed. This method will only wait if called when this System Bundle
+	 * is in the {@link #STARTING}, {@link #ACTIVE}, or {@link #STOPPING}
+	 * states. Otherwise it will return immediately.
+	 * <p>
+	 * A Framework Event is returned to indicate why this System Bundle has
+	 * stopped.
+	 * 
+	 * @param timeout Maximum number of milliseconds to wait until this System
+	 *        Bundle has completely stopped. A value of zero will wait
+	 *        indefinitely.
+	 * @return A Framework Event indicating the reason this method returned. The
+	 *         following <code>FrameworkEvent</code> types may be returned by
+	 *         this method.
+	 *         <ul>
+	 *         <li>{@link FrameworkEvent#STOPPED STOPPED} - This System Bundle
+	 *         has been stopped which has shutdown its framework instance. </li>
+	 *         <li>{@link FrameworkEvent#STOPPED_UPDATE STOPPED_UPDATE} - This
+	 *         System Bundle has been updated which has shutdown and will
+	 *         restart its framework instance.</li> <li>
+	 *         {@link FrameworkEvent#STOPPED_BOOTCLASSPATH_MODIFIED
+	 *         STOPPED_BOOTCLASSPATH_MODIFIED} - This System Bundle has been
+	 *         stopped which has shutdown its framework instance and a
+	 *         bootclasspath extension bundle has been installed or updated. The
+	 *         VM must be restarted in order for the changed boot class path to
+	 *         take affect. </li> <li>{@link FrameworkEvent#ERROR ERROR} - The
+	 *         Framework encountered an error while shutting down or an error
+	 *         has occurred which forced the framework to shutdown. </li> <li>
+	 *         {@link FrameworkEvent#INFO INFO} - This method has timed out and
+	 *         returned before this System Bundle has stopped.</li>
+	 *         </ul>
+	 * @throws InterruptedException If another thread interrupted the current
+	 *         thread before or while the current thread was waiting for this
+	 *         System Bundle to completely stop. The <i>interrupted status</i>
+	 *         of the current thread is cleared when this exception is thrown.
+	 * @throws IllegalArgumentException If the value of timeout is negative.
+	 */
+	public FrameworkEvent waitForStop(long timeout) throws InterruptedException;
+
+	/**
+	 * Start this System Bundle.
+	 * 
+	 * <p>
+	 * The following steps are taken to start this System Bundle:
+	 * <ol>
+	 * <li>If this System Bundle is not in the {@link #STARTING} state,
+	 * {@link #init() initialize} this System Bundle.</li>
+	 * <li>All installed bundles must be started in accordance with each
+	 * bundle's persistent <i>autostart setting</i>. This means some bundles
+	 * will not be started, some will be started with <i>eager activation</i>
+	 * and some will be started with their <i>declared activation</i> policy.
+	 * <ul>
+	 * <li>If this System Bundle implements the optional <i>Start Level Service
+	 * Specification</i>, then the start level of this System Bundle's framework
+	 * instance is moved to the start level specified by the
+	 * {@link Constants#FRAMEWORK_BEGINNING_STARTLEVEL beginning start level}
+	 * framework property, as described in the <i>Start Level Service
+	 * Specification</i>. If this framework property is not specified, then the
+	 * start level of this System Bundle's framework instance is moved to start
+	 * level one (1).</li>
+	 * </ul>
+	 * Any exceptions that occur during bundle starting must be wrapped in a
+	 * {@link BundleException} and then published as a framework event of type
+	 * {@link FrameworkEvent#ERROR}</li>
+	 * </li>
+	 * <li>This System Bundle's state is set to {@link #ACTIVE}.</li>
+	 * <li>A framework event of type {@link FrameworkEvent#STARTED} is fired</li>
+	 * </ol>
+	 * 
+	 * @throws BundleException If this System Bundle could not be started.
+	 * @throws java.lang.SecurityException If the caller does not have the
+	 *         appropriate <code>AdminPermission[this,EXECUTE]</code>, and the
+	 *         Java Runtime Environment supports permissions.
+	 * @see "Start Level Service Specification"
+	 */
+	public void start() throws BundleException;
+
+	/**
+	 * Start this System Bundle.
+	 * 
+	 * <p>
+	 * Calling this method is the same as calling {@link #start()}. There are no
+	 * start options for the System Bundle.
+	 * 
+	 * @param options Ignored. There are no start options for the System Bundle.
+	 * @throws BundleException If this System Bundle could not be started.
+	 * @throws java.lang.SecurityException If the caller does not have the
+	 *         appropriate <code>AdminPermission[this,EXECUTE]</code>, and the
+	 *         Java Runtime Environment supports permissions.
+	 * @see #start()
+	 */
+	public void start(int options) throws BundleException;
+
+	/**
+	 * Stop this System Bundle.
+	 * 
+	 * <p>
+	 * The method returns immediately to the caller after initiating the
+	 * following steps to be taken on another thread.
+	 * <ol>
+	 * <li>This System Bundle's state is set to {@link #STOPPING}.</li>
+	 * <li>All installed bundles must be stopped without changing each bundle's
+	 * persistent <i>autostart setting</i>.
+	 * <ul>
+	 * <li>If this System Bundle implements the optional <i>Start Level Service
+	 * Specification</i>, then the start level of this System Bundle's framework
+	 * instance is moved to start level zero (0), as described in the <i>Start
+	 * Level Service Specification</i>.</li>
+	 * </ul>
+	 * Any exceptions that occur during bundle stopping must be wrapped in a
+	 * {@link BundleException} and then published as a framework event of type
+	 * {@link FrameworkEvent#ERROR}</li>
+	 * </li>
+	 * <li>Unregister all services registered by this System Bundle.</li>
+	 * <li>Event handling is disabled in this System Bundle's framework
+	 * instance.</li>
+	 * <li>This System Bundle's state is set to {@link #RESOLVED}.</li>
+	 * <li>All resources held by this System Bundle's framework instance are
+	 * released. This includes threads, bundle class loaders, open files, etc.</li>
+	 * <li>Notify all threads that are waiting at {@link #waitForStop(long)
+	 * waitForStop} that the stop operation has completed.</li>
+	 * </ol>
+	 * <p>
+	 * After being stopped, this System Bundle may be discarded, initialized or
+	 * started.
+	 * 
+	 * @throws BundleException If stopping this System Bundle could not be
+	 *         initiated.
+	 * @throws java.lang.SecurityException If the caller does not have the
+	 *         appropriate <code>AdminPermission[this,EXECUTE]</code>, and the
+	 *         Java Runtime Environment supports permissions.
+	 * @see "Start Level Service Specification"
+	 */
+	public void stop() throws BundleException;
+
+	/**
+	 * Stop this System Bundle.
+	 * 
+	 * <p>
+	 * Calling this method is the same as calling {@link #stop()}. There are no
+	 * stop options for the System Bundle.
+	 * 
+	 * @param options Ignored. There are no stop options for the System Bundle.
+	 * @throws BundleException If stopping this System Bundle could not be
+	 *         initiated.
+	 * @throws java.lang.SecurityException If the caller does not have the
+	 *         appropriate <code>AdminPermission[this,EXECUTE]</code>, and the
+	 *         Java Runtime Environment supports permissions.
+	 * @see #stop()
+	 */
+	public void stop(int options) throws BundleException;
+
+	/**
+	 * The System Bundle cannot be uninstalled.
+	 * 
+	 * <p>
+	 * This method always throws a BundleException.
+	 * 
+	 * @throws BundleException This System Bundle cannot be uninstalled.
+	 * @throws java.lang.SecurityException If the caller does not have the
+	 *         appropriate <code>AdminPermission[this,LIFECYCLE]</code>, and the
+	 *         Java Runtime Environment supports permissions.
+	 */
+	public void uninstall() throws BundleException;
+
+	/**
+	 * Stop and restart this System Bundle.
+	 * 
+	 * <p>
+	 * The method returns immediately to the caller after initiating the
+	 * following steps to be taken on another thread.
+	 * <ol>
+	 * <li>Perform the steps in the {@link #stop()} method to stop this System
+	 * Bundle.</li>
+	 * <li>Perform the steps in the {@link #start()} method to start this System
+	 * Bundle.</li>
+	 * </ol>
+	 * 
+	 * @throws BundleException If stopping and restarting this System Bundle
+	 *         could not be initiated.
+	 * @throws java.lang.SecurityException If the caller does not have the
+	 *         appropriate <code>AdminPermission[this,LIFECYCLE]</code>, and the
+	 *         Java Runtime Environment supports permissions.
+	 */
+	public void update() throws BundleException;
+
+	/**
+	 * Stop and restart this System Bundle.
+	 * 
+	 * <p>
+	 * Calling this method is the same as calling {@link #update()} except that
+	 * any provided InputStream is immediately closed.
+	 * 
+	 * @param in Any provided InputStream is immediately closed before returning
+	 *        from this method and otherwise ignored.
+	 * @throws BundleException If stopping and restarting this System Bundle
+	 *         could not be initiated.
+	 * @throws java.lang.SecurityException If the caller does not have the
+	 *         appropriate <code>AdminPermission[this,LIFECYCLE]</code>, and the
+	 *         Java Runtime Environment supports permissions.
+	 */
+	public void update(InputStream in) throws BundleException;
+
+	/**
+	 * Returns the System Bundle unique identifier. This System Bundle is
+	 * assigned the unique identifier zero (0).
+	 * 
+	 * @return 0.
+	 * @see Bundle#getBundleId()
+	 */
+	public long getBundleId();
+
+	/**
+	 * Returns the System Bundle location identifier.
+	 * 
+	 * @return The string &quot;<code>System Bundle</code>&quot;.
+	 * @throws java.lang.SecurityException If the caller does not have the
+	 *         appropriate <code>AdminPermission[this,METADATA]</code>, and the
+	 *         Java Runtime Environment supports permissions.
+	 * @see Bundle#getLocation()
+	 * @see Constants#SYSTEM_BUNDLE_LOCATION
+	 */
+	public String getLocation();
 
-public interface SystemBundle extends Bundle
-{
-    public static final String FRAMEWORK_STORAGE_PROP = "org.osgi.framework.storage";
-
-    /**
-     * Initializes the System Bundle. After calling this method, the System
-     * Bundle must be in the STARTING state and must have a valid Bundle Context.
-     * The System Bundle will not actually be started until start() is called.
-     * If the System Bundle is not initialized called prior to calling start(),
-     * then the start method must initialize the System Bundle prior to starting. 
-    **/
-    public void init() throws BundleException;
-
-    /**
-     * Wait until this System Bundle has completely stopped. The stop and update
-     * methods on a System Bundle perform an asynchronous stop of the System
-     * Bundle. This method can be used to wait until the asynchronous stop of
-     * this System Bundle has completed. This method will only wait if called
-     * when this System Bundle is in the STARTING, ACTIVE, or STOPPING states.
-     * Otherwise it will return immediately.
-    **/
-    public void waitForStop(long timeout) throws InterruptedException;
-}
\ No newline at end of file
+	/**
+	 * Returns the symbolic name of this System Bundle. The symbolic name is
+	 * unique for the implementation of the framework. However, the symbolic
+	 * name &quot;<code>system.bundle</code>&quot; must be recognized as an
+	 * alias to the implementation-defined symbolic name.
+	 * 
+	 * @return The symbolic name of this System Bundle.
+	 * @see Bundle#getSymbolicName()
+	 * @see Constants#SYSTEM_BUNDLE_SYMBOLICNAME
+	 */
+	public String getSymbolicName();
+}

Modified: felix/trunk/main/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/main/pom.xml?rev=703448&r1=703447&r2=703448&view=diff
==============================================================================
--- felix/trunk/main/pom.xml (original)
+++ felix/trunk/main/pom.xml Fri Oct 10 06:12:44 2008
@@ -105,7 +105,7 @@
             <Bundle-Name>Apache Felix</Bundle-Name>
             <Bundle-Description>OSGi R4 framework.</Bundle-Description>
             <Bundle-Vendor>The Apache Software Foundation</Bundle-Vendor>
-            <Private-Package>org.apache.felix.main.*,org.apache.felix.moduleloader.*;-split-package:=merge-first,org.apache.felix.framework.*;-split-package:=merge-first,org.osgi.framework;-split-package:=merge-first,org.osgi.service.packageadmin;-split-package:=merge-first,org.osgi.service.startlevel;-split-package:=merge-first,org.osgi.service.url;-split-package:=merge-first,org.osgi.util.tracker;-split-package:=merge-first</Private-Package>
+            <Private-Package>org.apache.felix.main.*,org.apache.felix.moduleloader.*;org.apache.felix.framework.*;org.osgi.framework;org.osgi.framework.launch;org.osgi.service.packageadmin;org.osgi.service.startlevel;org.osgi.service.url;org.osgi.util.tracker;-split-package:=merge-first</Private-Package>
             <Import-Package>!*</Import-Package>
             <Include-Resource>META-INF/LICENSE=LICENSE,META-INF/NOTICE=NOTICE,{src/main/resources/}</Include-Resource>
             <!-- Include these properties here because we want them

Modified: felix/trunk/main/src/main/java/org/apache/felix/main/Main.java
URL: http://svn.apache.org/viewvc/felix/trunk/main/src/main/java/org/apache/felix/main/Main.java?rev=703448&r1=703447&r2=703448&view=diff
==============================================================================
--- felix/trunk/main/src/main/java/org/apache/felix/main/Main.java (original)
+++ felix/trunk/main/src/main/java/org/apache/felix/main/Main.java Fri Oct 10 06:12:44 2008
@@ -24,9 +24,8 @@
 import java.util.*;
 
 import org.apache.felix.framework.Felix;
-import org.apache.felix.framework.cache.BundleCache;
 import org.apache.felix.framework.util.StringMap;
-import org.osgi.framework.SystemBundle;
+import org.osgi.framework.Constants;
 
 /**
  * <p>
@@ -189,7 +188,7 @@
         // that overwrites anything in the config file.
         if (args.length > 0)
         {
-            configProps.setProperty(SystemBundle.FRAMEWORK_STORAGE_PROP, args[0]);
+            configProps.setProperty(Constants.FRAMEWORK_STORAGE, args[0]);
         }
 
         // Print welcome banner.



Mime
View raw message