Return-Path: Delivered-To: apmail-incubator-felix-commits-archive@www.apache.org Received: (qmail 42473 invoked from network); 18 Oct 2006 22:02:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Oct 2006 22:02:18 -0000 Received: (qmail 43164 invoked by uid 500); 18 Oct 2006 22:02:17 -0000 Delivered-To: apmail-incubator-felix-commits-archive@incubator.apache.org Received: (qmail 43131 invoked by uid 500); 18 Oct 2006 22:02:17 -0000 Mailing-List: contact felix-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: felix-dev@incubator.apache.org Delivered-To: mailing list felix-commits@incubator.apache.org Received: (qmail 43110 invoked by uid 99); 18 Oct 2006 22:02:17 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2006 15:02:17 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2006 15:02:12 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id D55EB1A983A; Wed, 18 Oct 2006 15:01:27 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r465392 [10/10] - in /incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi: framework/ service/condpermadmin/ service/packageadmin/ service/permissionadmin/ service/startlevel/ service/url/ Date: Wed, 18 Oct 2006 22:01:24 -0000 To: felix-commits@incubator.apache.org From: rickhall@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061018220127.D55EB1A983A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Modified: incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/startlevel/StartLevel.java URL: http://svn.apache.org/viewvc/incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/startlevel/StartLevel.java?view=diff&rev=465392&r1=465391&r2=465392 ============================================================================== --- incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/startlevel/StartLevel.java (original) +++ incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/startlevel/StartLevel.java Wed Oct 18 15:01:22 2006 @@ -1,238 +1,238 @@ -/* - * $Header: /cvshome/build/org.osgi.service.startlevel/src/org/osgi/service/startlevel/StartLevel.java,v 1.12 2006/03/14 01:21:38 hargrave Exp $ - * - * Copyright (c) OSGi Alliance (2002, 2005). 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.service.startlevel; - -import org.osgi.framework.Bundle; - -/** - * The StartLevel service allows management agents to manage a start level - * assigned to each bundle and the active start level of the Framework. There is - * at most one StartLevel service present in the OSGi environment. - * - *

- * A start level is defined to be a state of execution in which the Framework - * exists. StartLevel values are defined as unsigned integers with 0 (zero) - * being the state where the Framework is not launched. Progressively higher - * integral values represent progressively higher start levels. e.g. 2 is a - * higher start level than 1. - *

- * Access to the StartLevel service is protected by corresponding - * ServicePermission. In addition AdminPermission - * is required to actually modify start level information. - *

- * Start Level support in the Framework includes the ability to control the - * beginning start level of the Framework, to modify the active start level of - * the Framework and to assign a specific start level to a bundle. How the - * beginning start level of a Framework is specified is implementation - * dependent. It may be a command line argument when invoking the Framework - * implementation. - *

- * When the Framework is first started it must be at start level zero. In this - * state, no bundles are running. This is the initial state of the Framework - * before it is launched. - * - * When the Framework is launched, the Framework will enter start level one and - * all bundles which are assigned to start level one and are persistently marked - * to be started are started as described in the Bundle.start - * method. Within a start level, bundles are started in ascending order by - * Bundle.getBundleId. The Framework will continue to increase - * the start level, starting bundles at each start level, until the Framework - * has reached a beginning start level. At this point the Framework has - * completed starting bundles and will then fire a Framework event of type - * FrameworkEvent.STARTED to announce it has completed its - * launch. - * - *

- * The StartLevel service can be used by management bundles to alter the active - * start level of the framework. - * - * @version $Revision: 1.12 $ - */ -public interface StartLevel { - /** - * Return the active start level value of the Framework. - * - * If the Framework is in the process of changing the start level this - * method must return the active start level if this differs from the - * requested start level. - * - * @return The active start level value of the Framework. - */ - public int getStartLevel(); - - /** - * Modify the active start level of the Framework. - * - *

- * The Framework will move to the requested start level. This method will - * return immediately to the caller and the start level change will occur - * asynchronously on another thread. - * - *

- * If the specified start level is higher than the active start level, the - * Framework will continue to increase the start level until the Framework - * has reached the specified start level, starting bundles at each start - * level which are persistently marked to be started as described in the - * Bundle.start method. - * - * At each intermediate start level value on the way to and including the - * target start level, the framework must: - *

    - *
  1. Change the active start level to the intermediate start level value. - *
  2. Start bundles at the intermediate start level in ascending order by - * Bundle.getBundleId. - *
- * When this process completes after the specified start level is reached, - * the Framework will fire a Framework event of type - * FrameworkEvent.STARTLEVEL_CHANGED to announce it has moved - * to the specified start level. - * - *

- * If the specified start level is lower than the active start level, the - * Framework will continue to decrease the start level until the Framework - * has reached the specified start level stopping bundles at each start - * level as described in the Bundle.stop method except that - * their persistently recorded state indicates that they must be restarted - * in the future. - * - * At each intermediate start level value on the way to and including the - * specified start level, the framework must: - *

    - *
  1. Stop bundles at the intermediate start level in descending order by - * Bundle.getBundleId. - *
  2. Change the active start level to the intermediate start level value. - *
- * When this process completes after the specified start level is reached, - * the Framework will fire a Framework event of type - * FrameworkEvent.STARTLEVEL_CHANGED to announce it has moved - * to the specified start level. - * - *

- * If the specified start level is equal to the active start level, then no - * bundles are started or stopped, however, the Framework must fire a - * Framework event of type FrameworkEvent.STARTLEVEL_CHANGED - * to announce it has finished moving to the specified start level. This - * event may arrive before the this method return. - * - * @param startlevel The requested start level for the Framework. - * @throws IllegalArgumentException If the specified start level is less - * than or equal to zero. - * @throws SecurityException If the caller does not have - * AdminPermission[System Bundle,STARTLEVEL] and the Java runtime - * environment supports permissions. - */ - public void setStartLevel(int startlevel); - - /** - * Return the assigned start level value for the specified Bundle. - * - * @param bundle The target bundle. - * @return The start level value of the specified Bundle. - * @throws java.lang.IllegalArgumentException If the specified bundle has - * been uninstalled. - */ - public int getBundleStartLevel(Bundle bundle); - - /** - * Assign a start level value to the specified Bundle. - * - *

- * The specified bundle will be assigned the specified start level. The - * start level value assigned to the bundle will be persistently recorded by - * the Framework. - * - * If the new start level for the bundle is lower than or equal to the - * active start level of the Framework, the Framework will start the - * specified bundle as described in the Bundle.start method - * if the bundle is persistently marked to be started. The actual starting - * of this bundle must occur asynchronously. - * - * If the new start level for the bundle is higher than the active start - * level of the Framework, the Framework will stop the specified bundle as - * described in the Bundle.stop method except that the - * persistently recorded state for the bundle indicates that the bundle must - * be restarted in the future. The actual stopping of this bundle must occur - * asynchronously. - * - * @param bundle The target bundle. - * @param startlevel The new start level for the specified Bundle. - * @throws IllegalArgumentException If the specified bundle has been - * uninstalled or if the specified start level is less than or equal - * to zero, or the specified bundle is the system bundle. - * @throws SecurityException If the caller does not have - * AdminPermission[bundle,EXECUTE] and the Java runtime - * environment supports permissions. - */ - public void setBundleStartLevel(Bundle bundle, int startlevel); - - /** - * Return the initial start level value that is assigned to a Bundle when it - * is first installed. - * - * @return The initial start level value for Bundles. - * @see #setInitialBundleStartLevel - */ - public int getInitialBundleStartLevel(); - - /** - * Set the initial start level value that is assigned to a Bundle when it is - * first installed. - * - *

- * The initial bundle start level will be set to the specified start level. - * The initial bundle start level value will be persistently recorded by the - * Framework. - * - *

- * When a Bundle is installed via BundleContext.installBundle, - * it is assigned the initial bundle start level value. - * - *

- * The default initial bundle start level value is 1 unless this method has - * been called to assign a different initial bundle start level value. - * - *

- * Thie method does not change the start level values of installed bundles. - * - * @param startlevel The initial start level for newly installed bundles. - * @throws IllegalArgumentException If the specified start level is less - * than or equal to zero. - * @throws SecurityException If the caller does not have - * AdminPermission[System Bundle,STARTLEVEL] and the Java runtime - * environment supports permissions. - */ - public void setInitialBundleStartLevel(int startlevel); - - /** - * Return the persistent state of the specified bundle. - * - *

- * This method returns the persistent state of a bundle. The persistent - * state of a bundle indicates whether a bundle is persistently marked to be - * started when it's start level is reached. - * - * @param bundle The bundle for which to return the persistently started state. - * @return true if the bundle is persistently marked to be - * started, false if the bundle is not persistently - * marked to be started. - * @throws java.lang.IllegalArgumentException If the specified bundle has - * been uninstalled. - */ - public boolean isBundlePersistentlyStarted(Bundle bundle); -} \ No newline at end of file +/* + * $Header: /cvshome/build/org.osgi.service.startlevel/src/org/osgi/service/startlevel/StartLevel.java,v 1.13 2006/06/16 16:31:38 hargrave Exp $ + * + * Copyright (c) OSGi Alliance (2002, 2006). 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.service.startlevel; + +import org.osgi.framework.Bundle; + +/** + * The StartLevel service allows management agents to manage a start level + * assigned to each bundle and the active start level of the Framework. There is + * at most one StartLevel service present in the OSGi environment. + * + *

+ * A start level is defined to be a state of execution in which the Framework + * exists. StartLevel values are defined as unsigned integers with 0 (zero) + * being the state where the Framework is not launched. Progressively higher + * integral values represent progressively higher start levels. e.g. 2 is a + * higher start level than 1. + *

+ * Access to the StartLevel service is protected by corresponding + * ServicePermission. In addition AdminPermission + * is required to actually modify start level information. + *

+ * Start Level support in the Framework includes the ability to control the + * beginning start level of the Framework, to modify the active start level of + * the Framework and to assign a specific start level to a bundle. How the + * beginning start level of a Framework is specified is implementation + * dependent. It may be a command line argument when invoking the Framework + * implementation. + *

+ * When the Framework is first started it must be at start level zero. In this + * state, no bundles are running. This is the initial state of the Framework + * before it is launched. + * + * When the Framework is launched, the Framework will enter start level one and + * all bundles which are assigned to start level one and are persistently marked + * to be started are started as described in the Bundle.start + * method. Within a start level, bundles are started in ascending order by + * Bundle.getBundleId. The Framework will continue to increase + * the start level, starting bundles at each start level, until the Framework + * has reached a beginning start level. At this point the Framework has + * completed starting bundles and will then fire a Framework event of type + * FrameworkEvent.STARTED to announce it has completed its + * launch. + * + *

+ * The StartLevel service can be used by management bundles to alter the active + * start level of the framework. + * + * @version $Revision: 1.13 $ + */ +public interface StartLevel { + /** + * Return the active start level value of the Framework. + * + * If the Framework is in the process of changing the start level this + * method must return the active start level if this differs from the + * requested start level. + * + * @return The active start level value of the Framework. + */ + public int getStartLevel(); + + /** + * Modify the active start level of the Framework. + * + *

+ * The Framework will move to the requested start level. This method will + * return immediately to the caller and the start level change will occur + * asynchronously on another thread. + * + *

+ * If the specified start level is higher than the active start level, the + * Framework will continue to increase the start level until the Framework + * has reached the specified start level, starting bundles at each start + * level which are persistently marked to be started as described in the + * Bundle.start method. + * + * At each intermediate start level value on the way to and including the + * target start level, the framework must: + *

    + *
  1. Change the active start level to the intermediate start level value. + *
  2. Start bundles at the intermediate start level in ascending order by + * Bundle.getBundleId. + *
+ * When this process completes after the specified start level is reached, + * the Framework will fire a Framework event of type + * FrameworkEvent.STARTLEVEL_CHANGED to announce it has moved + * to the specified start level. + * + *

+ * If the specified start level is lower than the active start level, the + * Framework will continue to decrease the start level until the Framework + * has reached the specified start level stopping bundles at each start + * level as described in the Bundle.stop method except that + * their persistently recorded state indicates that they must be restarted + * in the future. + * + * At each intermediate start level value on the way to and including the + * specified start level, the framework must: + *

    + *
  1. Stop bundles at the intermediate start level in descending order by + * Bundle.getBundleId. + *
  2. Change the active start level to the intermediate start level value. + *
+ * When this process completes after the specified start level is reached, + * the Framework will fire a Framework event of type + * FrameworkEvent.STARTLEVEL_CHANGED to announce it has moved + * to the specified start level. + * + *

+ * If the specified start level is equal to the active start level, then no + * bundles are started or stopped, however, the Framework must fire a + * Framework event of type FrameworkEvent.STARTLEVEL_CHANGED + * to announce it has finished moving to the specified start level. This + * event may arrive before the this method return. + * + * @param startlevel The requested start level for the Framework. + * @throws IllegalArgumentException If the specified start level is less + * than or equal to zero. + * @throws SecurityException If the caller does not have + * AdminPermission[System Bundle,STARTLEVEL] and the Java runtime + * environment supports permissions. + */ + public void setStartLevel(int startlevel); + + /** + * Return the assigned start level value for the specified Bundle. + * + * @param bundle The target bundle. + * @return The start level value of the specified Bundle. + * @throws java.lang.IllegalArgumentException If the specified bundle has + * been uninstalled. + */ + public int getBundleStartLevel(Bundle bundle); + + /** + * Assign a start level value to the specified Bundle. + * + *

+ * The specified bundle will be assigned the specified start level. The + * start level value assigned to the bundle will be persistently recorded by + * the Framework. + * + * If the new start level for the bundle is lower than or equal to the + * active start level of the Framework, the Framework will start the + * specified bundle as described in the Bundle.start method + * if the bundle is persistently marked to be started. The actual starting + * of this bundle must occur asynchronously. + * + * If the new start level for the bundle is higher than the active start + * level of the Framework, the Framework will stop the specified bundle as + * described in the Bundle.stop method except that the + * persistently recorded state for the bundle indicates that the bundle must + * be restarted in the future. The actual stopping of this bundle must occur + * asynchronously. + * + * @param bundle The target bundle. + * @param startlevel The new start level for the specified Bundle. + * @throws IllegalArgumentException If the specified bundle has been + * uninstalled or if the specified start level is less than or equal + * to zero, or the specified bundle is the system bundle. + * @throws SecurityException If the caller does not have + * AdminPermission[bundle,EXECUTE] and the Java runtime + * environment supports permissions. + */ + public void setBundleStartLevel(Bundle bundle, int startlevel); + + /** + * Return the initial start level value that is assigned to a Bundle when it + * is first installed. + * + * @return The initial start level value for Bundles. + * @see #setInitialBundleStartLevel + */ + public int getInitialBundleStartLevel(); + + /** + * Set the initial start level value that is assigned to a Bundle when it is + * first installed. + * + *

+ * The initial bundle start level will be set to the specified start level. + * The initial bundle start level value will be persistently recorded by the + * Framework. + * + *

+ * When a Bundle is installed via BundleContext.installBundle, + * it is assigned the initial bundle start level value. + * + *

+ * The default initial bundle start level value is 1 unless this method has + * been called to assign a different initial bundle start level value. + * + *

+ * Thie method does not change the start level values of installed bundles. + * + * @param startlevel The initial start level for newly installed bundles. + * @throws IllegalArgumentException If the specified start level is less + * than or equal to zero. + * @throws SecurityException If the caller does not have + * AdminPermission[System Bundle,STARTLEVEL] and the Java runtime + * environment supports permissions. + */ + public void setInitialBundleStartLevel(int startlevel); + + /** + * Return the persistent state of the specified bundle. + * + *

+ * This method returns the persistent state of a bundle. The persistent + * state of a bundle indicates whether a bundle is persistently marked to be + * started when it's start level is reached. + * + * @param bundle The bundle for which to return the persistently started state. + * @return true if the bundle is persistently marked to be + * started, false if the bundle is not persistently + * marked to be started. + * @throws java.lang.IllegalArgumentException If the specified bundle has + * been uninstalled. + */ + public boolean isBundlePersistentlyStarted(Bundle bundle); +} Modified: incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/startlevel/package.html URL: http://svn.apache.org/viewvc/incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/startlevel/package.html?view=diff&rev=465392&r1=465391&r2=465392 ============================================================================== --- incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/startlevel/package.html (original) +++ incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/startlevel/package.html Wed Oct 18 15:01:22 2006 @@ -1,6 +1,6 @@ - + -

The OSGi StartLevel service Package. Specification Version 1.0. +

Start Level Package Version 1.0.

Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. For example: Added: incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/startlevel/packageinfo URL: http://svn.apache.org/viewvc/incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/startlevel/packageinfo?view=auto&rev=465392 ============================================================================== --- incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/startlevel/packageinfo (added) +++ incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/startlevel/packageinfo Wed Oct 18 15:01:22 2006 @@ -0,0 +1 @@ +version 1.0 Modified: incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/AbstractURLStreamHandlerService.java URL: http://svn.apache.org/viewvc/incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/AbstractURLStreamHandlerService.java?view=diff&rev=465392&r1=465391&r2=465392 ============================================================================== --- incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/AbstractURLStreamHandlerService.java (original) +++ incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/AbstractURLStreamHandlerService.java Wed Oct 18 15:01:22 2006 @@ -1,150 +1,150 @@ -/* - * $Header: /cvshome/build/org.osgi.service.url/src/org/osgi/service/url/AbstractURLStreamHandlerService.java,v 1.7 2006/03/14 01:21:36 hargrave Exp $ - * - * Copyright (c) OSGi Alliance (2002, 2005). 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.service.url; - -import java.net.*; - -/** - * Abstract implementation of the URLStreamHandlerService interface. - * All the methods simply invoke the corresponding methods on - * java.net.URLStreamHandler except for parseURL and - * setURL, which use the URLStreamHandlerSetter - * parameter. Subclasses of this abstract class should not need to override the - * setURL and parseURL(URLStreamHandlerSetter,...) - * methods. - * - * @version $Revision: 1.7 $ - */ -public abstract class AbstractURLStreamHandlerService extends URLStreamHandler - implements URLStreamHandlerService { - /** - * @see "java.net.URLStreamHandler.openConnection" - */ - public abstract URLConnection openConnection(URL u) - throws java.io.IOException; - - /** - * The URLStreamHandlerSetter object passed to the parseURL - * method. - */ - protected URLStreamHandlerSetter realHandler; - - /** - * Parse a URL using the URLStreamHandlerSetter object. This - * method sets the realHandler field with the specified - * URLStreamHandlerSetter object and then calls - * parseURL(URL,String,int,int). - * - * @param realHandler The object on which the setURL method must - * be invoked for the specified URL. - * @see "java.net.URLStreamHandler.parseURL" - */ - public void parseURL(URLStreamHandlerSetter realHandler, URL u, - String spec, int start, int limit) { - this.realHandler = realHandler; - parseURL(u, spec, start, limit); - } - - /** - * This method calls super.toExternalForm. - * - * @see "java.net.URLStreamHandler.toExternalForm" - */ - public String toExternalForm(URL u) { - return super.toExternalForm(u); - } - - /** - * This method calls super.equals(URL,URL). - * - * @see "java.net.URLStreamHandler.equals(URL,URL)" - */ - public boolean equals(URL u1, URL u2) { - return super.equals(u1, u2); - } - - /** - * This method calls super.getDefaultPort. - * - * @see "java.net.URLStreamHandler.getDefaultPort" - */ - public int getDefaultPort() { - return super.getDefaultPort(); - } - - /** - * This method calls super.getHostAddress. - * - * @see "java.net.URLStreamHandler.getHostAddress" - */ - public InetAddress getHostAddress(URL u) { - return super.getHostAddress(u); - } - - /** - * This method calls super.hashCode(URL). - * - * @see "java.net.URLStreamHandler.hashCode(URL)" - */ - public int hashCode(URL u) { - return super.hashCode(u); - } - - /** - * This method calls super.hostsEqual. - * - * @see "java.net.URLStreamHandler.hostsEqual" - */ - public boolean hostsEqual(URL u1, URL u2) { - return super.hostsEqual(u1, u2); - } - - /** - * This method calls super.sameFile. - * - * @see "java.net.URLStreamHandler.sameFile" - */ - public boolean sameFile(URL u1, URL u2) { - return super.sameFile(u1, u2); - } - - /** - * This method calls - * realHandler.setURL(URL,String,String,int,String,String). - * - * @see "java.net.URLStreamHandler.setURL(URL,String,String,int,String,String)" - * @deprecated This method is only for compatibility with handlers written - * for JDK 1.1. - */ - protected void setURL(URL u, String proto, String host, int port, - String file, String ref) { - realHandler.setURL(u, proto, host, port, file, ref); - } - - /** - * This method calls - * realHandler.setURL(URL,String,String,int,String,String,String,String). - * - * @see "java.net.URLStreamHandler.setURL(URL,String,String,int,String,String,String,String)" - */ - protected void setURL(URL u, String proto, String host, int port, - String auth, String user, String path, String query, String ref) { - realHandler.setURL(u, proto, host, port, auth, user, path, query, ref); - } -} \ No newline at end of file +/* + * $Header: /cvshome/build/org.osgi.service.url/src/org/osgi/service/url/AbstractURLStreamHandlerService.java,v 1.8 2006/06/16 16:31:31 hargrave Exp $ + * + * Copyright (c) OSGi Alliance (2002, 2006). 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.service.url; + +import java.net.*; + +/** + * Abstract implementation of the URLStreamHandlerService interface. + * All the methods simply invoke the corresponding methods on + * java.net.URLStreamHandler except for parseURL and + * setURL, which use the URLStreamHandlerSetter + * parameter. Subclasses of this abstract class should not need to override the + * setURL and parseURL(URLStreamHandlerSetter,...) + * methods. + * + * @version $Revision: 1.8 $ + */ +public abstract class AbstractURLStreamHandlerService extends URLStreamHandler + implements URLStreamHandlerService { + /** + * @see "java.net.URLStreamHandler.openConnection" + */ + public abstract URLConnection openConnection(URL u) + throws java.io.IOException; + + /** + * The URLStreamHandlerSetter object passed to the parseURL + * method. + */ + protected URLStreamHandlerSetter realHandler; + + /** + * Parse a URL using the URLStreamHandlerSetter object. This + * method sets the realHandler field with the specified + * URLStreamHandlerSetter object and then calls + * parseURL(URL,String,int,int). + * + * @param realHandler The object on which the setURL method must + * be invoked for the specified URL. + * @see "java.net.URLStreamHandler.parseURL" + */ + public void parseURL(URLStreamHandlerSetter realHandler, URL u, + String spec, int start, int limit) { + this.realHandler = realHandler; + parseURL(u, spec, start, limit); + } + + /** + * This method calls super.toExternalForm. + * + * @see "java.net.URLStreamHandler.toExternalForm" + */ + public String toExternalForm(URL u) { + return super.toExternalForm(u); + } + + /** + * This method calls super.equals(URL,URL). + * + * @see "java.net.URLStreamHandler.equals(URL,URL)" + */ + public boolean equals(URL u1, URL u2) { + return super.equals(u1, u2); + } + + /** + * This method calls super.getDefaultPort. + * + * @see "java.net.URLStreamHandler.getDefaultPort" + */ + public int getDefaultPort() { + return super.getDefaultPort(); + } + + /** + * This method calls super.getHostAddress. + * + * @see "java.net.URLStreamHandler.getHostAddress" + */ + public InetAddress getHostAddress(URL u) { + return super.getHostAddress(u); + } + + /** + * This method calls super.hashCode(URL). + * + * @see "java.net.URLStreamHandler.hashCode(URL)" + */ + public int hashCode(URL u) { + return super.hashCode(u); + } + + /** + * This method calls super.hostsEqual. + * + * @see "java.net.URLStreamHandler.hostsEqual" + */ + public boolean hostsEqual(URL u1, URL u2) { + return super.hostsEqual(u1, u2); + } + + /** + * This method calls super.sameFile. + * + * @see "java.net.URLStreamHandler.sameFile" + */ + public boolean sameFile(URL u1, URL u2) { + return super.sameFile(u1, u2); + } + + /** + * This method calls + * realHandler.setURL(URL,String,String,int,String,String). + * + * @see "java.net.URLStreamHandler.setURL(URL,String,String,int,String,String)" + * @deprecated This method is only for compatibility with handlers written + * for JDK 1.1. + */ + protected void setURL(URL u, String proto, String host, int port, + String file, String ref) { + realHandler.setURL(u, proto, host, port, file, ref); + } + + /** + * This method calls + * realHandler.setURL(URL,String,String,int,String,String,String,String). + * + * @see "java.net.URLStreamHandler.setURL(URL,String,String,int,String,String,String,String)" + */ + protected void setURL(URL u, String proto, String host, int port, + String auth, String user, String path, String query, String ref) { + realHandler.setURL(u, proto, host, port, auth, user, path, query, ref); + } +} Modified: incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/URLConstants.java URL: http://svn.apache.org/viewvc/incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/URLConstants.java?view=diff&rev=465392&r1=465391&r2=465392 ============================================================================== --- incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/URLConstants.java (original) +++ incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/URLConstants.java Wed Oct 18 15:01:22 2006 @@ -1,44 +1,44 @@ -/* - * $Header: /cvshome/build/org.osgi.service.url/src/org/osgi/service/url/URLConstants.java,v 1.7 2006/03/14 01:21:36 hargrave Exp $ - * - * Copyright (c) OSGi Alliance (2002, 2005). 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.service.url; - -/** - * Defines standard names for property keys associated with - * {@link URLStreamHandlerService}and java.net.ContentHandler - * services. - * - *

- * The values associated with these keys are of type java.lang.String[], - * unless otherwise indicated. - * - * @version $Revision: 1.7 $ - */ -public interface URLConstants { - /** - * Service property naming the protocols serviced by a - * URLStreamHandlerService. The property's value is an array of protocol - * names. - */ - public static final String URL_HANDLER_PROTOCOL = "url.handler.protocol"; - /** - * Service property naming the MIME types serviced by a - * java.net.ContentHandler. The property's value is an array of MIME types. - */ - public static final String URL_CONTENT_MIMETYPE = "url.content.mimetype"; -} \ No newline at end of file +/* + * $Header: /cvshome/build/org.osgi.service.url/src/org/osgi/service/url/URLConstants.java,v 1.9 2006/07/11 00:53:59 hargrave Exp $ + * + * Copyright (c) OSGi Alliance (2002, 2006). 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.service.url; + +/** + * Defines standard names for property keys associated with + * {@link URLStreamHandlerService} and java.net.ContentHandler + * services. + * + *

+ * The values associated with these keys are of type java.lang.String[], + * unless otherwise indicated. + * + * @version $Revision: 1.9 $ + */ +public interface URLConstants { + /** + * Service property naming the protocols serviced by a + * URLStreamHandlerService. The property's value is an array of protocol + * names. + */ + public static final String URL_HANDLER_PROTOCOL = "url.handler.protocol"; + /** + * Service property naming the MIME types serviced by a + * java.net.ContentHandler. The property's value is an array of MIME types. + */ + public static final String URL_CONTENT_MIMETYPE = "url.content.mimetype"; +} Modified: incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/URLStreamHandlerService.java URL: http://svn.apache.org/viewvc/incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/URLStreamHandlerService.java?view=diff&rev=465392&r1=465391&r2=465392 ============================================================================== --- incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/URLStreamHandlerService.java (original) +++ incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/URLStreamHandlerService.java Wed Oct 18 15:01:22 2006 @@ -1,92 +1,92 @@ -/* - * $Header: /cvshome/build/org.osgi.service.url/src/org/osgi/service/url/URLStreamHandlerService.java,v 1.7 2006/03/14 01:21:36 hargrave Exp $ - * - * Copyright (c) OSGi Alliance (2002, 2005). 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.service.url; - -import java.net.*; - -/** - * Service interface with public versions of the protected - * java.net.URLStreamHandler methods. - *

- * The important differences between this interface and the - * URLStreamHandler class are that the setURL method is - * absent and the parseURL method takes a - * {@link URLStreamHandlerSetter}object as the first argument. Classes - * implementing this interface must call the setURL method on the - * URLStreamHandlerSetter object received in the parseURL - * method instead of URLStreamHandler.setURL to avoid a - * SecurityException. - * - * @see AbstractURLStreamHandlerService - * - * @version $Revision: 1.7 $ - */ -public interface URLStreamHandlerService { - /** - * @see "java.net.URLStreamHandler.openConnection" - */ - public URLConnection openConnection(URL u) throws java.io.IOException; - - /** - * Parse a URL. This method is called by the URLStreamHandler - * proxy, instead of java.net.URLStreamHandler.parseURL, passing - * a URLStreamHandlerSetter object. - * - * @param realHandler The object on which setURL must be invoked - * for this URL. - * @see "java.net.URLStreamHandler.parseURL" - */ - public void parseURL(URLStreamHandlerSetter realHandler, URL u, - String spec, int start, int limit); - - /** - * @see "java.net.URLStreamHandler.toExternalForm" - */ - public String toExternalForm(URL u); - - /** - * @see "java.net.URLStreamHandler.equals(URL, URL)" - */ - public boolean equals(URL u1, URL u2); - - /** - * @see "java.net.URLStreamHandler.getDefaultPort" - */ - public int getDefaultPort(); - - /** - * @see "java.net.URLStreamHandler.getHostAddress" - */ - public InetAddress getHostAddress(URL u); - - /** - * @see "java.net.URLStreamHandler.hashCode(URL)" - */ - public int hashCode(URL u); - - /** - * @see "java.net.URLStreamHandler.hostsEqual" - */ - public boolean hostsEqual(URL u1, URL u2); - - /** - * @see "java.net.URLStreamHandler.sameFile" - */ - public boolean sameFile(URL u1, URL u2); -} \ No newline at end of file +/* + * $Header: /cvshome/build/org.osgi.service.url/src/org/osgi/service/url/URLStreamHandlerService.java,v 1.9 2006/07/11 00:53:59 hargrave Exp $ + * + * Copyright (c) OSGi Alliance (2002, 2006). 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.service.url; + +import java.net.*; + +/** + * Service interface with public versions of the protected + * java.net.URLStreamHandler methods. + *

+ * The important differences between this interface and the + * URLStreamHandler class are that the setURL method is + * absent and the parseURL method takes a + * {@link URLStreamHandlerSetter} object as the first argument. Classes + * implementing this interface must call the setURL method on the + * URLStreamHandlerSetter object received in the parseURL + * method instead of URLStreamHandler.setURL to avoid a + * SecurityException. + * + * @see AbstractURLStreamHandlerService + * + * @version $Revision: 1.9 $ + */ +public interface URLStreamHandlerService { + /** + * @see "java.net.URLStreamHandler.openConnection" + */ + public URLConnection openConnection(URL u) throws java.io.IOException; + + /** + * Parse a URL. This method is called by the URLStreamHandler + * proxy, instead of java.net.URLStreamHandler.parseURL, passing + * a URLStreamHandlerSetter object. + * + * @param realHandler The object on which setURL must be invoked + * for this URL. + * @see "java.net.URLStreamHandler.parseURL" + */ + public void parseURL(URLStreamHandlerSetter realHandler, URL u, + String spec, int start, int limit); + + /** + * @see "java.net.URLStreamHandler.toExternalForm" + */ + public String toExternalForm(URL u); + + /** + * @see "java.net.URLStreamHandler.equals(URL, URL)" + */ + public boolean equals(URL u1, URL u2); + + /** + * @see "java.net.URLStreamHandler.getDefaultPort" + */ + public int getDefaultPort(); + + /** + * @see "java.net.URLStreamHandler.getHostAddress" + */ + public InetAddress getHostAddress(URL u); + + /** + * @see "java.net.URLStreamHandler.hashCode(URL)" + */ + public int hashCode(URL u); + + /** + * @see "java.net.URLStreamHandler.hostsEqual" + */ + public boolean hostsEqual(URL u1, URL u2); + + /** + * @see "java.net.URLStreamHandler.sameFile" + */ + public boolean sameFile(URL u1, URL u2); +} Modified: incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/URLStreamHandlerSetter.java URL: http://svn.apache.org/viewvc/incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/URLStreamHandlerSetter.java?view=diff&rev=465392&r1=465391&r2=465392 ============================================================================== --- incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/URLStreamHandlerSetter.java (original) +++ incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/URLStreamHandlerSetter.java Wed Oct 18 15:01:22 2006 @@ -1,52 +1,52 @@ -/* - * $Header: /cvshome/build/org.osgi.service.url/src/org/osgi/service/url/URLStreamHandlerSetter.java,v 1.7 2006/03/14 01:21:36 hargrave Exp $ - * - * Copyright (c) OSGi Alliance (2002, 2005). 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.service.url; - -import java.net.URL; - -/** - * Interface used by URLStreamHandlerService objects to call the - * setURL method on the proxy URLStreamHandler object. - * - *

- * Objects of this type are passed to the - * {@link URLStreamHandlerService#parseURL}method. Invoking the setURL - * method on the URLStreamHandlerSetter object will invoke the - * setURL method on the proxy URLStreamHandler object that - * is actually registered with java.net.URL for the protocol. - * - * @version $Revision: 1.7 $ - */ -public interface URLStreamHandlerSetter { - /** - * @see "java.net.URLStreamHandler.setURL(URL,String,String,int,String,String)" - * - * @deprecated This method is only for compatibility with handlers written - * for JDK 1.1. - */ - public void setURL(URL u, String protocol, String host, int port, - String file, String ref); - - /** - * @see "java.net.URLStreamHandler.setURL(URL,String,String,int,String,String,String,String)" - */ - public void setURL(URL u, String protocol, String host, int port, - String authority, String userInfo, String path, String query, - String ref); -} \ No newline at end of file +/* + * $Header: /cvshome/build/org.osgi.service.url/src/org/osgi/service/url/URLStreamHandlerSetter.java,v 1.9 2006/07/11 00:53:59 hargrave Exp $ + * + * Copyright (c) OSGi Alliance (2002, 2006). 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.service.url; + +import java.net.URL; + +/** + * Interface used by URLStreamHandlerService objects to call the + * setURL method on the proxy URLStreamHandler object. + * + *

+ * Objects of this type are passed to the + * {@link URLStreamHandlerService#parseURL} method. Invoking the setURL + * method on the URLStreamHandlerSetter object will invoke the + * setURL method on the proxy URLStreamHandler object that + * is actually registered with java.net.URL for the protocol. + * + * @version $Revision: 1.9 $ + */ +public interface URLStreamHandlerSetter { + /** + * @see "java.net.URLStreamHandler.setURL(URL,String,String,int,String,String)" + * + * @deprecated This method is only for compatibility with handlers written + * for JDK 1.1. + */ + public void setURL(URL u, String protocol, String host, int port, + String file, String ref); + + /** + * @see "java.net.URLStreamHandler.setURL(URL,String,String,int,String,String,String,String)" + */ + public void setURL(URL u, String protocol, String host, int port, + String authority, String userInfo, String path, String query, + String ref); +} Modified: incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/package.html URL: http://svn.apache.org/viewvc/incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/package.html?view=diff&rev=465392&r1=465391&r2=465392 ============================================================================== --- incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/package.html (original) +++ incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/package.html Wed Oct 18 15:01:22 2006 @@ -1,6 +1,6 @@ - + -

The OSGi URL Stream and Content Handlers API Package. Specification Version 1.0. +

URL Stream and Content Handlers Package Version 1.0.

Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. For example: Added: incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/packageinfo URL: http://svn.apache.org/viewvc/incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/packageinfo?view=auto&rev=465392 ============================================================================== --- incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/packageinfo (added) +++ incubator/felix/trunk/org.osgi.core/src/main/java/org/osgi/service/url/packageinfo Wed Oct 18 15:01:22 2006 @@ -0,0 +1 @@ +version 1.0