Return-Path: Delivered-To: apmail-felix-commits-archive@www.apache.org Received: (qmail 53879 invoked from network); 2 Jun 2010 20:28:35 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Jun 2010 20:28:35 -0000 Received: (qmail 19744 invoked by uid 500); 2 Jun 2010 20:28:35 -0000 Delivered-To: apmail-felix-commits-archive@felix.apache.org Received: (qmail 19722 invoked by uid 500); 2 Jun 2010 20:28:35 -0000 Mailing-List: contact commits-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list commits@felix.apache.org Received: (qmail 19715 invoked by uid 99); 2 Jun 2010 20:28:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jun 2010 20:28:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jun 2010 20:28:31 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 189F82388978; Wed, 2 Jun 2010 20:28:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@felix.apache.org From: rickhall@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100602202810.189F82388978@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 wires) throws BundleException; + BundleActivator getActivator(); + + Class loadClass(String name); + URL getResource(String name); + Enumeration getResources(String name); + + URL getEntry(String entry); + Enumeration getEntryPaths(); + Enumeration 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 getResources(String name); } \ No newline at end of file