felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r950748 - in /felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework: BundleContextImpl.java ModuleImpl.java ext/FelixBundleContext.java ext/VirtualBundleContext.java ext/VirtualBundleRevision.java ext/Wire.java
Date Wed, 02 Jun 2010 20:28:09 GMT
Author: rickhall
Date: Wed Jun  2 20:28:09 2010
New Revision: 950748

URL: http://svn.apache.org/viewvc?rev=950748&view=rev
Log:
Initial pass at virtual bundle related interfaces.

Added:
    felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/VirtualBundleContext.java
      - copied, changed from r950628, felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/FelixBundleContext.java
    felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/VirtualBundleRevision.java
      - copied, changed from r950628, felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/FelixBundleContext.java
    felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/Wire.java
      - copied, changed from r950628, felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/FelixBundleContext.java
Modified:
    felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/BundleContextImpl.java
    felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ModuleImpl.java
    felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/FelixBundleContext.java

Modified: felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/BundleContextImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/BundleContextImpl.java?rev=950748&r1=950747&r2=950748&view=diff
==============================================================================
--- felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/BundleContextImpl.java
(original)
+++ felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/BundleContextImpl.java
Wed Jun  2 20:28:09 2010
@@ -21,8 +21,11 @@ package org.apache.felix.framework;
 import java.io.File;
 import java.io.InputStream;
 import java.util.Dictionary;
+import java.util.Map;
 
 import org.apache.felix.framework.ext.FelixBundleContext;
+import org.apache.felix.framework.ext.VirtualBundleRevision;
+import org.apache.felix.framework.ext.VirtualBundleContext;
 import org.osgi.framework.*;
 
 class BundleContextImpl implements FelixBundleContext
@@ -44,26 +47,6 @@ class BundleContextImpl implements Felix
         m_valid = false;
     }
 
-    public void addRequirement(String s) throws BundleException
-    {
-        throw new BundleException("Not implemented yet.");
-    }
-
-    public void removeRequirement() throws BundleException
-    {
-        throw new BundleException("Not implemented yet.");
-    }
-
-    public void addCapability() throws BundleException
-    {
-        throw new BundleException("Not implemented yet.");
-    }
-
-    public void removeCapability() throws BundleException
-    {
-        throw new BundleException("Not implemented yet.");
-    }
-
     public String getProperty(String name)
     {
         checkValidity();
@@ -132,6 +115,16 @@ class BundleContextImpl implements Felix
         return result;
     }
 
+    public VirtualBundleContext installBundle(Map headers, VirtualBundleRevision vb)
+    {
+        return null;
+    }
+
+    public VirtualBundleContext reinstallBundle(Bundle b, VirtualBundleRevision vb)
+    {
+        return null;
+    }
+
     public Bundle getBundle(long id)
     {
         checkValidity();

Modified: felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ModuleImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ModuleImpl.java?rev=950748&r1=950747&r2=950748&view=diff
==============================================================================
--- felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ModuleImpl.java
(original)
+++ felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ModuleImpl.java
Wed Jun  2 20:28:09 2010
@@ -110,7 +110,7 @@ public class ModuleImpl implements Modul
     private ModuleClassLoader m_classLoader;
     private boolean m_isActivationTriggered = false;
     private ProtectionDomain m_protectionDomain = null;
-    private static SecureAction m_secureAction = new SecureAction();
+    private static final SecureAction m_secureAction = new SecureAction();
 
     // Bundle-specific class loader for boot delegation.
     private final ClassLoader m_bootClassLoader;

Modified: felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/FelixBundleContext.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/FelixBundleContext.java?rev=950748&r1=950747&r2=950748&view=diff
==============================================================================
--- felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/FelixBundleContext.java
(original)
+++ felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/FelixBundleContext.java
Wed Jun  2 20:28:09 2010
@@ -18,13 +18,12 @@
  */
 package org.apache.felix.framework.ext;
 
+import java.util.Map;
+import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
 
 public interface FelixBundleContext extends BundleContext
 {
-    public void addRequirement(String s) throws BundleException;
-    public void removeRequirement() throws BundleException;
-    public void addCapability() throws BundleException;
-    public void removeCapability() throws BundleException;
+    VirtualBundleContext installBundle(Map headers, VirtualBundleRevision vb);
+    VirtualBundleContext reinstallBundle(Bundle bundle, VirtualBundleRevision vb);
 }
\ No newline at end of file

Copied: felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/VirtualBundleContext.java
(from r950628, felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/FelixBundleContext.java)
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/VirtualBundleContext.java?p2=felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/VirtualBundleContext.java&p1=felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/FelixBundleContext.java&r1=950628&r2=950748&rev=950748&view=diff
==============================================================================
--- felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/FelixBundleContext.java
(original)
+++ felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/VirtualBundleContext.java
Wed Jun  2 20:28:09 2010
@@ -1,4 +1,4 @@
-/* 
+/*
  * 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
@@ -6,9 +6,9 @@
  * 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
- *
+ * 
  *   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
@@ -18,13 +18,11 @@
  */
 package org.apache.felix.framework.ext;
 
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
+import java.io.File;
+import org.osgi.framework.Bundle;
 
-public interface FelixBundleContext extends BundleContext
+public interface VirtualBundleContext
 {
-    public void addRequirement(String s) throws BundleException;
-    public void removeRequirement() throws BundleException;
-    public void addCapability() throws BundleException;
-    public void removeCapability() throws BundleException;
+    Bundle getBundle();
+    File getDataFile();
 }
\ No newline at end of file

Copied: felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/VirtualBundleRevision.java
(from r950628, felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/FelixBundleContext.java)
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/VirtualBundleRevision.java?p2=felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/VirtualBundleRevision.java&p1=felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/FelixBundleContext.java&r1=950628&r2=950748&rev=950748&view=diff
==============================================================================
--- felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/FelixBundleContext.java
(original)
+++ felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/VirtualBundleRevision.java
Wed Jun  2 20:28:09 2010
@@ -1,4 +1,4 @@
-/* 
+/*
  * 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
@@ -6,9 +6,9 @@
  * 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
- *
+ * 
  *   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
@@ -18,13 +18,23 @@
  */
 package org.apache.felix.framework.ext;
 
-import org.osgi.framework.BundleContext;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.List;
+import org.apache.felix.framework.resolver.Wire;
+import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleException;
 
-public interface FelixBundleContext extends BundleContext
+public interface VirtualBundleRevision
 {
-    public void addRequirement(String s) throws BundleException;
-    public void removeRequirement() throws BundleException;
-    public void addCapability() throws BundleException;
-    public void removeCapability() throws BundleException;
+    void resolve(List<Wire> wires) throws BundleException;
+    BundleActivator getActivator();
+
+    Class loadClass(String name);
+    URL getResource(String name);
+    Enumeration getResources(String name);
+
+    URL getEntry(String entry);
+    Enumeration<String> getEntryPaths();
+    Enumeration<URL> findEntries();
 }
\ No newline at end of file

Copied: felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/Wire.java
(from r950628, felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/FelixBundleContext.java)
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/Wire.java?p2=felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/Wire.java&p1=felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/FelixBundleContext.java&r1=950628&r2=950748&rev=950748&view=diff
==============================================================================
--- felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/FelixBundleContext.java
(original)
+++ felix/sandbox/rickhall/framework-vb/src/main/java/org/apache/felix/framework/ext/Wire.java
Wed Jun  2 20:28:09 2010
@@ -1,4 +1,4 @@
-/* 
+/*
  * 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
@@ -6,9 +6,9 @@
  * 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
- *
+ * 
  *   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
@@ -18,13 +18,12 @@
  */
 package org.apache.felix.framework.ext;
 
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
+import java.net.URL;
+import java.util.Enumeration;
 
-public interface FelixBundleContext extends BundleContext
+public interface Wire
 {
-    public void addRequirement(String s) throws BundleException;
-    public void removeRequirement() throws BundleException;
-    public void addCapability() throws BundleException;
-    public void removeCapability() throws BundleException;
+    Class loadClass(String name);
+    URL getResource(String name);
+    Enumeration<URL> getResources(String name);
 }
\ No newline at end of file



Mime
View raw message