felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r331745 - /incubator/felix/trunk/framework/src/org/apache/felix/framework/OSGiURLPolicy.java
Date Tue, 08 Nov 2005 09:02:39 GMT
Author: rickhall
Date: Tue Nov  8 01:02:36 2005
New Revision: 331745

URL: http://svn.apache.org/viewcvs?rev=331745&view=rev
Log:
Modified the bundle resource URL creation method to use the handlers from
the new URL Handlers service.

Modified:
    incubator/felix/trunk/framework/src/org/apache/felix/framework/OSGiURLPolicy.java

Modified: incubator/felix/trunk/framework/src/org/apache/felix/framework/OSGiURLPolicy.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/framework/src/org/apache/felix/framework/OSGiURLPolicy.java?rev=331745&r1=331744&r2=331745&view=diff
==============================================================================
--- incubator/felix/trunk/framework/src/org/apache/felix/framework/OSGiURLPolicy.java (original)
+++ incubator/felix/trunk/framework/src/org/apache/felix/framework/OSGiURLPolicy.java Tue
Nov  8 01:02:36 2005
@@ -25,13 +25,13 @@
 
 public class OSGiURLPolicy implements URLPolicy
 {
-    private Felix m_felix = null;
-    private BundleURLStreamHandler m_handler = null;
+    private Felix m_framework = null;
+    private URLHandlersBundleStreamHandler m_bundleHandler = null;
     private FakeURLStreamHandler m_fakeHandler = null;
 
-    public OSGiURLPolicy(Felix felix)
+    public OSGiURLPolicy(Felix framework)
     {
-        m_felix = felix;
+        m_framework = framework;
     }
 
     public URL createCodeSourceURL(ModuleManager mgr, Module module)
@@ -75,9 +75,9 @@
 
     public URL createResourceURL(ModuleManager mgr, Module module, int rsIdx, String name)
     {
-        if (m_handler == null)
+        if (m_bundleHandler == null)
         {
-            m_handler = new BundleURLStreamHandler(mgr);
+            m_bundleHandler = new URLHandlersBundleStreamHandler(m_framework);
         }
 
         // Add a slash if there is one already, otherwise
@@ -98,7 +98,7 @@
             else
             {
                 return new URL(FelixConstants.BUNDLE_URL_PROTOCOL,
-                    module.getId(), -1, "/" + rsIdx + name, m_handler);
+                    module.getId(), -1, "/" + rsIdx + name, m_bundleHandler);
             }
         }
         catch (Exception ex)
@@ -127,7 +127,8 @@
 
         public Object run() throws Exception
         {
-            return new URL("bundle", m_id, -1, "/" + m_rsIdx + m_name, m_handler);
+            return new URL(FelixConstants.BUNDLE_URL_PROTOCOL,
+                m_id, -1, "/" + m_rsIdx + m_name, m_bundleHandler);
         }
     }
 }



Mime
View raw message