Author: rickhall
Date: Tue Jun 15 20:59:36 2010
New Revision: 955051
URL: http://svn.apache.org/viewvc?rev=955051&view=rev
Log:
Rename wire classes.
Added:
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ext/Wire.java
- copied, changed from r955040,
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ext/VBWire.java
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/ResolverWire.java
- copied, changed from r955040,
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/Wire.java
Removed:
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ext/VBWire.java
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/Wire.java
Modified:
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/AbstractModuleImpl.java
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/Felix.java
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/FelixResolverState.java
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ManagedModuleImpl.java
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/UnmanagedModuleImpl.java
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/WireBootImpl.java
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ext/VirtualModule.java
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/Module.java
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/Resolver.java
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/WireImpl.java
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/WireModuleImpl.java
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/util/Util.java
Modified:
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/AbstractModuleImpl.java
URL:
http://svn.apache.org/viewvc/felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/AbstractModuleImpl.java?rev=955051&r1=955050&r2=955051&view=diff
==============================================================================
---
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/AbstractModuleImpl.java
(original)
+++
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/AbstractModuleImpl.java
Tue Jun 15 20:59:36 2010
@@ -33,10 +33,10 @@ import org.apache.felix.framework.capabi
import org.apache.felix.framework.capabilityset.Directive;
import org.apache.felix.framework.capabilityset.Requirement;
import org.apache.felix.framework.capabilityset.SimpleFilter;
-import org.apache.felix.framework.ext.VBWire;
+import org.apache.felix.framework.ext.Wire;
import org.apache.felix.framework.resolver.Content;
import org.apache.felix.framework.resolver.Module;
-import org.apache.felix.framework.resolver.Wire;
+import org.apache.felix.framework.resolver.ResolverWire;
import org.apache.felix.framework.util.SecureAction;
import org.apache.felix.framework.util.manifestparser.ManifestParser;
import org.apache.felix.framework.util.manifestparser.R4Library;
@@ -67,7 +67,7 @@ abstract class AbstractModuleImpl implem
private final Bundle m_bundle;
- private List<VBWire> m_wires = null;
+ private List<Wire> m_wires = null;
private List<Module> m_dependentHosts = new ArrayList<Module>(0);
private List<Module> m_dependentImporters = new ArrayList<Module>(0);
private List<Module> m_dependentRequirers = new ArrayList<Module>(0);
@@ -230,12 +230,12 @@ abstract class AbstractModuleImpl implem
return m_id;
}
- public synchronized List<VBWire> getWires()
+ public synchronized List<Wire> getWires()
{
return m_wires;
}
- public synchronized void resolve(VBWire bootWire, List<VBWire> wires)
+ public synchronized void resolve(Wire bootWire, List<Wire> wires)
throws BundleException
{
// Remove module from old wire modules' dependencies,
@@ -243,16 +243,16 @@ abstract class AbstractModuleImpl implem
// from the old wires.
for (int i = 0; (m_wires != null) && (i < m_wires.size()); i++)
{
- if (((Wire) m_wires.get(i)).getCapability().getNamespace()
+ if (((ResolverWire) m_wires.get(i)).getCapability().getNamespace()
.equals(Capability.MODULE_NAMESPACE))
{
- ((AbstractModuleImpl) ((Wire) m_wires.get(i)).getExporter())
+ ((AbstractModuleImpl) ((ResolverWire)
m_wires.get(i)).getExporter())
.removeDependentRequirer(this);
}
- else if (((Wire) m_wires.get(i)).getCapability().getNamespace()
+ else if (((ResolverWire)
m_wires.get(i)).getCapability().getNamespace()
.equals(Capability.PACKAGE_NAMESPACE))
{
- ((AbstractModuleImpl) ((Wire) m_wires.get(i)).getExporter())
+ ((AbstractModuleImpl) ((ResolverWire)
m_wires.get(i)).getExporter())
.removeDependentImporter(this);
}
}
@@ -262,16 +262,16 @@ abstract class AbstractModuleImpl implem
// Add ourself as a dependent to the new wires' modules.
for (int i = 0; (m_wires != null) && (i < m_wires.size()); i++)
{
- if (((Wire) m_wires.get(i)).getCapability().getNamespace()
+ if (((ResolverWire) m_wires.get(i)).getCapability().getNamespace()
.equals(Capability.MODULE_NAMESPACE))
{
- ((AbstractModuleImpl) ((Wire) m_wires.get(i)).getExporter())
+ ((AbstractModuleImpl) ((ResolverWire)
m_wires.get(i)).getExporter())
.addDependentRequirer(this);
}
- else if (((Wire) m_wires.get(i)).getCapability().getNamespace()
+ else if (((ResolverWire)
m_wires.get(i)).getCapability().getNamespace()
.equals(Capability.PACKAGE_NAMESPACE))
{
- ((AbstractModuleImpl) ((Wire) m_wires.get(i)).getExporter())
+ ((AbstractModuleImpl) ((ResolverWire)
m_wires.get(i)).getExporter())
.addDependentImporter(this);
}
}
Modified:
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/Felix.java
URL:
http://svn.apache.org/viewvc/felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/Felix.java?rev=955051&r1=955050&r2=955051&view=diff
==============================================================================
---
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/Felix.java
(original)
+++
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/Felix.java
Tue Jun 15 20:59:36 2010
@@ -35,9 +35,9 @@ import org.apache.felix.framework.capabi
import org.apache.felix.framework.resolver.Module;
import org.apache.felix.framework.capabilityset.Requirement;
import org.apache.felix.framework.capabilityset.SimpleFilter;
-import org.apache.felix.framework.resolver.Wire;
+import org.apache.felix.framework.resolver.ResolverWire;
import org.apache.felix.framework.ext.SecurityProvider;
-import org.apache.felix.framework.ext.VBWire;
+import org.apache.felix.framework.ext.Wire;
import org.apache.felix.framework.ext.VirtualModule;
import org.apache.felix.framework.ext.VirtualModuleContext;
import org.apache.felix.framework.resolver.ResolveException;
@@ -3507,11 +3507,11 @@ ex.printStackTrace();
((AbstractModuleImpl)
expModules.get(expIdx)).getDependentImporters();
for (int depIdx = 0; (dependents != null) && (depIdx <
dependents.size()); depIdx++)
{
- List<? extends VBWire> wires =
dependents.get(depIdx).getWires();
+ List<? extends Wire> wires = dependents.get(depIdx).getWires();
for (int wireIdx = 0; (wires != null) && (wireIdx <
wires.size()); wireIdx++)
{
- if ((((Wire) wires.get(wireIdx)).getExporter() ==
expModules.get(expIdx))
- && (((Wire)
wires.get(wireIdx)).hasPackage(ep.getName())))
+ if ((((ResolverWire) wires.get(wireIdx)).getExporter() ==
expModules.get(expIdx))
+ && (((ResolverWire)
wires.get(wireIdx)).hasPackage(ep.getName())))
{
list.add(dependents.get(depIdx).getBundle());
}
@@ -4195,7 +4195,7 @@ ex.printStackTrace();
try
{
// Resolve the module.
- Map<Module, List<Wire>> wireMap =
+ Map<Module, List<ResolverWire>> wireMap =
m_resolver.resolve(m_resolverState,
newRootModule);
// Mark all modules as resolved.
@@ -4238,9 +4238,9 @@ ex.printStackTrace();
}
}
- public Wire resolve(Module module, String pkgName) throws
ResolveException
+ public ResolverWire resolve(Module module, String pkgName) throws
ResolveException
{
- Wire candidateWire = null;
+ ResolverWire candidateWire = null;
// We cannot dynamically import if the module is not already
resolved
// or if it is not allowed, so check that first. Note: We check if
the
// dynamic import is allowed without holding any locks, but this is
@@ -4262,21 +4262,21 @@ ex.printStackTrace();
// dynamically importing the package, which can happen if
two
// threads are racing to do so. If we have an existing
wire,
// then just return it instead.
- List<VBWire> wires = module.getWires();
+ List<Wire> wires = module.getWires();
for (int i = 0; (wires != null) && (i < wires.size()); i++)
{
- if (((Wire) wires.get(i)).hasPackage(pkgName))
+ if (((ResolverWire) wires.get(i)).hasPackage(pkgName))
{
- return (Wire) wires.get(i);
+ return (ResolverWire) wires.get(i);
}
}
- Map<Module, List<Wire>> wireMap =
+ Map<Module, List<ResolverWire>> wireMap =
m_resolver.resolve(m_resolverState, module, pkgName);
if ((wireMap != null) && wireMap.containsKey(module))
{
- List<Wire> dynamicWires = wireMap.remove(module);
+ List<ResolverWire> dynamicWires =
wireMap.remove(module);
candidateWire = dynamicWires.get(0);
try
@@ -4287,7 +4287,7 @@ ex.printStackTrace();
// Dynamically add new wire to importing module.
if (candidateWire != null)
{
- wires = new ArrayList<VBWire>(wires.size() +
1);
+ wires = new ArrayList<Wire>(wires.size() + 1);
wires.addAll(module.getWires());
wires.add(candidateWire);
((AbstractModuleImpl) module).resolve(null,
wires);
@@ -4349,10 +4349,10 @@ m_logger.log(Logger.LOG_DEBUG, "DYNAMIC
}
// If any of our wires have this package, then we cannot
// attempt to dynamically import it.
- List<? extends VBWire> wires = module.getWires();
+ List<? extends Wire> wires = module.getWires();
for (int i = 0; (wires != null) && (i < wires.size()); i++)
{
- if (((Wire) wires.get(i)).hasPackage(pkgName))
+ if (((ResolverWire) wires.get(i)).hasPackage(pkgName))
{
return false;
}
@@ -4376,19 +4376,19 @@ m_logger.log(Logger.LOG_DEBUG, "DYNAMIC
return true;
}
- private void markResolvedModules(Map<Module, List<Wire>> wireMap)
+ private void markResolvedModules(Map<Module, List<ResolverWire>>
wireMap)
throws BundleException
{
if (wireMap != null)
{
- Iterator<Entry<Module, List<Wire>>> iter =
wireMap.entrySet().iterator();
+ Iterator<Entry<Module, List<ResolverWire>>> iter =
wireMap.entrySet().iterator();
// Iterate over the map to mark the modules as resolved and
// update our resolver data structures.
while (iter.hasNext())
{
- Entry<Module, List<Wire>> entry = iter.next();
+ Entry<Module, List<ResolverWire>> entry = iter.next();
Module module = entry.getKey();
- List<Wire> wires = entry.getValue();
+ List<ResolverWire> wires = entry.getValue();
// Only add wires attribute if some exist; export
// only modules may not have wires.
@@ -4399,7 +4399,7 @@ m_logger.log(Logger.LOG_DEBUG, "DYNAMIC
"WIRE: " + wires.get(wireIdx));
}
// TODO: VB - How to properly handle this generic crap?
- List<VBWire> vbWires = new ArrayList<VBWire>(wires);
+ List<Wire> vbWires = new ArrayList<Wire>(wires);
module.resolve(null, vbWires);
// Resolve all attached fragments.
Modified:
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/FelixResolverState.java
URL:
http://svn.apache.org/viewvc/felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/FelixResolverState.java?rev=955051&r1=955050&r2=955051&view=diff
==============================================================================
---
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/FelixResolverState.java
(original)
+++
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/FelixResolverState.java
Tue Jun 15 20:59:36 2010
@@ -32,8 +32,8 @@ import org.apache.felix.framework.capabi
import org.apache.felix.framework.capabilityset.Directive;
import org.apache.felix.framework.resolver.Module;
import org.apache.felix.framework.capabilityset.Requirement;
-import org.apache.felix.framework.ext.VBWire;
-import org.apache.felix.framework.resolver.Wire;
+import org.apache.felix.framework.ext.Wire;
+import org.apache.felix.framework.resolver.ResolverWire;
import org.apache.felix.framework.resolver.CandidateComparator;
import org.apache.felix.framework.resolver.ResolveException;
import org.apache.felix.framework.resolver.Resolver;
@@ -702,11 +702,11 @@ public class FelixResolverState implemen
// If so, then the framework must have chosen to have the module
// import rather than export the package, so we need to remove the
// corresponding package capability from the package capability
set.
- List<? extends VBWire> wires = module.getWires();
+ List<? extends Wire> wires = module.getWires();
List<Capability> caps = module.getCapabilities();
for (int wireIdx = 0; (wires != null) && (wireIdx < wires.size());
wireIdx++)
{
- Wire wire = (Wire) wires.get(wireIdx);
+ ResolverWire wire = (ResolverWire) wires.get(wireIdx);
if
(wire.getCapability().getNamespace().equals(Capability.PACKAGE_NAMESPACE))
{
for (int capIdx = 0;
Modified:
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ManagedModuleImpl.java
URL:
http://svn.apache.org/viewvc/felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ManagedModuleImpl.java?rev=955051&r1=955050&r2=955051&view=diff
==============================================================================
---
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ManagedModuleImpl.java
(original)
+++
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ManagedModuleImpl.java
Tue Jun 15 20:59:36 2010
@@ -52,8 +52,8 @@ import org.apache.felix.framework.resolv
import org.apache.felix.framework.resolver.Module;
import org.apache.felix.framework.resolver.ResolveException;
import org.apache.felix.framework.ext.ResourceNotFoundException;
-import org.apache.felix.framework.ext.VBWire;
-import org.apache.felix.framework.resolver.Wire;
+import org.apache.felix.framework.ext.Wire;
+import org.apache.felix.framework.resolver.ResolverWire;
import org.apache.felix.framework.resolver.WireImpl;
import org.apache.felix.framework.resolver.WireModuleImpl;
import org.apache.felix.framework.util.CompoundEnumeration;
@@ -564,7 +564,7 @@ public class ManagedModuleImpl extends A
// Note that the search may be aborted if this method throws an
// exception, otherwise it continues if a null is returned.
- List<? extends VBWire> wires = getWires();
+ List<? extends Wire> wires = getWires();
for (int i = 0; (wires != null) && (i < wires.size()); i++)
{
if (wires.get(i) instanceof WireImpl)
@@ -624,7 +624,7 @@ public class ManagedModuleImpl extends A
// At this point, the module's imports were searched and so was the
// the module's content. Now we make an attempt to load the
// class/resource via a dynamic import, if possible.
- Wire wire = null;
+ ResolverWire wire = null;
try
{
wire = m_resolver.resolve(this, pkgName);
@@ -1032,7 +1032,7 @@ public class ManagedModuleImpl extends A
throws ClassNotFoundException, ResourceNotFoundException
{
// We delegate to the module's wires to find the class or resource.
- List<? extends VBWire> wires = getWires();
+ List<? extends Wire> wires = getWires();
for (int i = 0; (wires != null) && (i < wires.size()); i++)
{
// If we find the class or resource, then return it.
@@ -1055,7 +1055,7 @@ public class ManagedModuleImpl extends A
// At this point, the module's imports were searched and so was the
// the module's content. Now we make an attempt to load the
// class/resource via a dynamic import, if possible.
- Wire wire = null;
+ ResolverWire wire = null;
try
{
wire = m_resolver.resolve(this, pkgName);
@@ -1723,13 +1723,13 @@ public class ManagedModuleImpl extends A
String importer = module.getBundle().toString();
// Next, check to see if the module imports the package.
- List<VBWire> wires = module.getWires();
+ List<Wire> wires = module.getWires();
for (int i = 0; (wires != null) && (i < wires.size()); i++)
{
- if (((Wire)
wires.get(i)).getCapability().getNamespace().equals(Capability.PACKAGE_NAMESPACE)
&&
- ((Wire)
wires.get(i)).getCapability().getAttribute(Capability.PACKAGE_ATTR).getValue().equals(pkgName))
+ if (((ResolverWire)
wires.get(i)).getCapability().getNamespace().equals(Capability.PACKAGE_NAMESPACE)
&&
+ ((ResolverWire)
wires.get(i)).getCapability().getAttribute(Capability.PACKAGE_ATTR).getValue().equals(pkgName))
{
- String exporter = ((Wire)
wires.get(i)).getExporter().getBundle().toString();
+ String exporter = ((ResolverWire)
wires.get(i)).getExporter().getBundle().toString();
StringBuffer sb = new StringBuffer("*** Package '");
sb.append(pkgName);
@@ -1823,7 +1823,7 @@ public class ManagedModuleImpl extends A
module, Capability.PACKAGE_NAMESPACE, dirs, attrs);
Set<Capability> exporters = resolver.getCandidates(module, req,
false);
- Wire wire = null;
+ ResolverWire wire = null;
try
{
wire = resolver.resolve(module, pkgName);
Modified:
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java
URL:
http://svn.apache.org/viewvc/felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java?rev=955051&r1=955050&r2=955051&view=diff
==============================================================================
---
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java
(original)
+++
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java
Tue Jun 15 20:59:36 2010
@@ -26,7 +26,7 @@ import org.apache.felix.framework.capabi
import org.apache.felix.framework.capabilityset.Capability;
import org.apache.felix.framework.capabilityset.Directive;
import org.apache.felix.framework.resolver.Module;
-import org.apache.felix.framework.resolver.Wire;
+import org.apache.felix.framework.resolver.ResolverWire;
import org.apache.felix.framework.util.MapToDictionary;
import org.apache.felix.framework.util.StringMap;
@@ -482,10 +482,10 @@ class ServiceRegistrationImpl implements
Util.getClassPackage(className);
Module requesterModule = ((BundleImpl)
requester).getCurrentModule();
// Get package wiring from service requester.
- Wire requesterWire = (Wire) Util.getWire(requesterModule, pkgName);
+ ResolverWire requesterWire = (ResolverWire)
Util.getWire(requesterModule, pkgName);
// Get package wiring from service provider.
Module providerModule = ((BundleImpl) m_bundle).getCurrentModule();
- Wire providerWire = (Wire) Util.getWire(providerModule, pkgName);
+ ResolverWire providerWire = (ResolverWire)
Util.getWire(providerModule, pkgName);
// There are four situations that may occur here:
// 1. Neither the requester, nor provider have wires for the
package.
Modified:
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/UnmanagedModuleImpl.java
URL:
http://svn.apache.org/viewvc/felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/UnmanagedModuleImpl.java?rev=955051&r1=955050&r2=955051&view=diff
==============================================================================
---
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/UnmanagedModuleImpl.java
(original)
+++
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/UnmanagedModuleImpl.java
Tue Jun 15 20:59:36 2010
@@ -30,11 +30,11 @@ import java.util.Map;
import org.apache.felix.framework.Felix.FelixResolver;
import org.apache.felix.framework.capabilityset.Capability;
import org.apache.felix.framework.capabilityset.Requirement;
-import org.apache.felix.framework.ext.VBWire;
+import org.apache.felix.framework.ext.Wire;
import org.apache.felix.framework.ext.VirtualModule;
import org.apache.felix.framework.resolver.Content;
import org.apache.felix.framework.resolver.Module;
-import org.apache.felix.framework.resolver.Wire;
+import org.apache.felix.framework.resolver.ResolverWire;
import org.apache.felix.framework.util.SecureAction;
import org.apache.felix.framework.util.manifestparser.CapabilityImpl;
import org.apache.felix.framework.util.manifestparser.R4Library;
@@ -79,7 +79,7 @@ public class UnmanagedModuleImpl extends
}
@Override
- public synchronized void resolve(VBWire bootWire, List<VBWire> wires)
+ public synchronized void resolve(Wire bootWire, List<Wire> wires)
throws BundleException
{
if (m_vm != null)
Modified:
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/WireBootImpl.java
URL:
http://svn.apache.org/viewvc/felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/WireBootImpl.java?rev=955051&r1=955050&r2=955051&view=diff
==============================================================================
---
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/WireBootImpl.java
(original)
+++
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/WireBootImpl.java
Tue Jun 15 20:59:36 2010
@@ -24,12 +24,12 @@ import java.util.Enumeration;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.felix.framework.ext.ResourceNotFoundException;
-import org.apache.felix.framework.ext.VBWire;
+import org.apache.felix.framework.ext.Wire;
import org.apache.felix.framework.util.Util;
// TODO: VB - This duplicates logic in ModuleImpl, so perhaps the two
// could be merged.
-class WireBootImpl implements VBWire
+class WireBootImpl implements Wire
{
private final ClassLoader m_bootLoader;
private final String[] m_bootPkgs;
Modified:
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ext/VirtualModule.java
URL:
http://svn.apache.org/viewvc/felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ext/VirtualModule.java?rev=955051&r1=955050&r2=955051&view=diff
==============================================================================
---
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ext/VirtualModule.java
(original)
+++
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ext/VirtualModule.java
Tue Jun 15 20:59:36 2010
@@ -21,13 +21,13 @@ package org.apache.felix.framework.ext;
import java.net.URL;
import java.util.Enumeration;
import java.util.List;
-import org.apache.felix.framework.resolver.Wire;
+import org.apache.felix.framework.resolver.ResolverWire;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleException;
public interface VirtualModule
{
- void resolve(VBWire bootWire, List<VBWire> wires) throws BundleException;
+ void resolve(Wire bootWire, List<Wire> wires) throws BundleException;
Class loadClass(String name) throws ClassNotFoundException;
URL getResource(String name);
Copied:
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ext/Wire.java
(from r955040,
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ext/VBWire.java)
URL:
http://svn.apache.org/viewvc/felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ext/Wire.java?p2=felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ext/Wire.java&p1=felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ext/VBWire.java&r1=955040&r2=955051&rev=955051&view=diff
==============================================================================
---
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ext/VBWire.java
(original)
+++
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/ext/Wire.java
Tue Jun 15 20:59:36 2010
@@ -21,7 +21,7 @@ package org.apache.felix.framework.ext;
import java.net.URL;
import java.util.Enumeration;
-public interface VBWire
+public interface Wire
{
public Class loadClass(String name) throws ClassNotFoundException;
public URL getResource(String name) throws ResourceNotFoundException;
Modified:
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/Module.java
URL:
http://svn.apache.org/viewvc/felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/Module.java?rev=955051&r1=955050&r2=955051&view=diff
==============================================================================
---
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/Module.java
(original)
+++
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/Module.java
Tue Jun 15 20:59:36 2010
@@ -26,7 +26,7 @@ import java.util.List;
import java.util.Map;
import org.apache.felix.framework.capabilityset.Capability;
import org.apache.felix.framework.capabilityset.Requirement;
-import org.apache.felix.framework.ext.VBWire;
+import org.apache.felix.framework.ext.Wire;
import org.apache.felix.framework.ext.VirtualModule;
import org.apache.felix.framework.util.manifestparser.R4Library;
import org.osgi.framework.Bundle;
@@ -55,7 +55,7 @@ public interface Module extends VirtualM
// Run-time data access methods.
Bundle getBundle();
String getId();
- List<VBWire> getWires();
+ List<Wire> getWires();
boolean isResolved();
boolean isResolvable();
Object getSecurityContext();
Modified:
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/Resolver.java
URL:
http://svn.apache.org/viewvc/felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/Resolver.java?rev=955051&r1=955050&r2=955051&view=diff
==============================================================================
---
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/Resolver.java
(original)
+++
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/Resolver.java
Tue Jun 15 20:59:36 2010
@@ -26,8 +26,8 @@ import org.apache.felix.framework.capabi
public interface Resolver
{
- Map<Module, List<Wire>> resolve(ResolverState state, Module module);
- Map<Module, List<Wire>> resolve(ResolverState state, Module module, String
pkgName);
+ Map<Module, List<ResolverWire>> resolve(ResolverState state, Module
module);
+ Map<Module, List<ResolverWire>> resolve(ResolverState state, Module
module, String pkgName);
public static interface ResolverState
{
Modified:
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
URL:
http://svn.apache.org/viewvc/felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java?rev=955051&r1=955050&r2=955051&view=diff
==============================================================================
---
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
(original)
+++
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
Tue Jun 15 20:59:36 2010
@@ -34,7 +34,7 @@ import org.apache.felix.framework.capabi
import org.apache.felix.framework.capabilityset.CapabilitySet;
import org.apache.felix.framework.capabilityset.Directive;
import org.apache.felix.framework.capabilityset.Requirement;
-import org.apache.felix.framework.ext.VBWire;
+import org.apache.felix.framework.ext.Wire;
import org.apache.felix.framework.util.Util;
import org.apache.felix.framework.util.manifestparser.RequirementImpl;
import org.osgi.framework.Constants;
@@ -44,7 +44,7 @@ public class ResolverImpl implements Res
private final Logger m_logger;
// Reusable empty array.
- private static final List<Wire> m_emptyWires = Util.m_emptyList;
+ private static final List<ResolverWire> m_emptyWires = Util.m_emptyList;
// Holds candidate permutations based on permutating "uses" chains.
// These permutations are given higher priority.
@@ -62,9 +62,9 @@ public class ResolverImpl implements Res
String v = System.getProperty("invoke.count");
}
- public Map<Module, List<Wire>> resolve(ResolverState state, Module module)
+ public Map<Module, List<ResolverWire>> resolve(ResolverState state, Module
module)
{
- Map<Module, List<Wire>> wireMap = new HashMap<Module, List<Wire>>();
+ Map<Module, List<ResolverWire>> wireMap = new HashMap<Module,
List<ResolverWire>>();
Map<Module, Packages> modulePkgMap = new HashMap<Module, Packages>();
@@ -137,7 +137,7 @@ public class ResolverImpl implements Res
return wireMap;
}
- public Map<Module, List<Wire>> resolve(ResolverState state, Module module,
String pkgName)
+ public Map<Module, List<ResolverWire>> resolve(ResolverState state, Module
module, String pkgName)
{
// We can only create a dynamic import if the following
// conditions are met:
@@ -154,7 +154,7 @@ public class ResolverImpl implements Res
{
try
{
- Map<Module, List<Wire>> wireMap = new HashMap();
+ Map<Module, List<ResolverWire>> wireMap = new HashMap();
Map<Module, Packages> modulePkgMap = new HashMap();
populateDynamicCandidates(state, module, candidateMap);
@@ -248,10 +248,10 @@ public class ResolverImpl implements Res
}
// If any of our wires have this package, then we cannot
// attempt to dynamically import it.
- List<VBWire> wires = module.getWires();
+ List<Wire> wires = module.getWires();
for (int i = 0; (wires != null) && (i < wires.size()); i++)
{
- if (((Wire) wires.get(i)).hasPackage(pkgName))
+ if (((ResolverWire) wires.get(i)).hasPackage(pkgName))
{
return null;
}
@@ -526,10 +526,10 @@ public class ResolverImpl implements Res
if (module.isResolved())
{
// Use wires to get actual requirements and satisfying
capabilities.
- for (VBWire wire : module.getWires())
+ for (Wire wire : module.getWires())
{
- reqs.add(((Wire) wire).getRequirement());
- caps.add(((Wire) wire).getCapability());
+ reqs.add(((ResolverWire) wire).getRequirement());
+ caps.add(((ResolverWire) wire).getCapability());
}
// Since the module is resolved, it could be dynamically importing,
@@ -1227,16 +1227,16 @@ public class ResolverImpl implements Res
return copy;
}
- private static Map<Module, List<Wire>> populateWireMap(
+ private static Map<Module, List<ResolverWire>> populateWireMap(
Module module, Map<Module, Packages> modulePkgMap,
- Map<Module, List<Wire>> wireMap, Map<Requirement, Set<Capability>>
candidateMap)
+ Map<Module, List<ResolverWire>> wireMap, Map<Requirement,
Set<Capability>> candidateMap)
{
if (!module.isResolved() && !wireMap.containsKey(module))
{
wireMap.put(module, m_emptyWires);
- List<Wire> packageWires = new ArrayList<Wire>();
- List<Wire> moduleWires = new ArrayList<Wire>();
+ List<ResolverWire> packageWires = new ArrayList<ResolverWire>();
+ List<ResolverWire> moduleWires = new ArrayList<ResolverWire>();
for (Requirement req : module.getRequirements())
{
@@ -1280,13 +1280,13 @@ public class ResolverImpl implements Res
return wireMap;
}
- private static Map<Module, List<Wire>> populateDynamicWireMap(
+ private static Map<Module, List<ResolverWire>> populateDynamicWireMap(
Module module, String pkgName, Map<Module, Packages> modulePkgMap,
- Map<Module, List<Wire>> wireMap, Map<Requirement, Set<Capability>>
candidateMap)
+ Map<Module, List<ResolverWire>> wireMap, Map<Requirement,
Set<Capability>> candidateMap)
{
wireMap.put(module, m_emptyWires);
- List<Wire> packageWires = new ArrayList<Wire>();
+ List<ResolverWire> packageWires = new ArrayList<ResolverWire>();
Packages pkgs = modulePkgMap.get(module);
for (Entry<String, List<Blame>> entry : pkgs.m_importedPkgs.entrySet())
Copied:
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/ResolverWire.java
(from r955040,
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/Wire.java)
URL:
http://svn.apache.org/viewvc/felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/ResolverWire.java?p2=felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/ResolverWire.java&p1=felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/Wire.java&r1=955040&r2=955051&rev=955051&view=diff
==============================================================================
---
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/Wire.java
(original)
+++
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/ResolverWire.java
Tue Jun 15 20:59:36 2010
@@ -23,9 +23,9 @@ import java.net.URL;
import java.util.Enumeration;
import org.apache.felix.framework.capabilityset.Capability;
import org.apache.felix.framework.capabilityset.Requirement;
-import org.apache.felix.framework.ext.VBWire;
+import org.apache.felix.framework.ext.Wire;
-public interface Wire extends VBWire
+public interface ResolverWire extends Wire
{
/**
* Returns the importing module.
Modified:
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/WireImpl.java
URL:
http://svn.apache.org/viewvc/felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/WireImpl.java?rev=955051&r1=955050&r2=955051&view=diff
==============================================================================
---
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/WireImpl.java
(original)
+++
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/WireImpl.java
Tue Jun 15 20:59:36 2010
@@ -26,7 +26,7 @@ import org.apache.felix.framework.capabi
import org.apache.felix.framework.util.Util;
import org.apache.felix.framework.util.manifestparser.CapabilityImpl;
-public class WireImpl implements Wire
+public class WireImpl implements ResolverWire
{
private final Module m_importer;
private final Requirement m_req;
Modified:
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/WireModuleImpl.java
URL:
http://svn.apache.org/viewvc/felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/WireModuleImpl.java?rev=955051&r1=955050&r2=955051&view=diff
==============================================================================
---
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/WireModuleImpl.java
(original)
+++
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/resolver/WireModuleImpl.java
Tue Jun 15 20:59:36 2010
@@ -26,7 +26,7 @@ import org.apache.felix.framework.capabi
import org.apache.felix.framework.capabilityset.Requirement;
import org.apache.felix.framework.util.Util;
-public class WireModuleImpl implements Wire
+public class WireModuleImpl implements ResolverWire
{
private final Module m_importer;
private final Requirement m_req;
Modified:
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/util/Util.java
URL:
http://svn.apache.org/viewvc/felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/util/Util.java?rev=955051&r1=955050&r2=955051&view=diff
==============================================================================
---
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/util/Util.java
(original)
+++
felix/sandbox/rickhall/vb/framework-vb/src/main/java/org/apache/felix/framework/util/Util.java
Tue Jun 15 20:59:36 2010
@@ -32,8 +32,8 @@ import org.apache.felix.framework.capabi
import org.apache.felix.framework.capabilityset.CapabilitySet;
import org.apache.felix.framework.resolver.Module;
import org.apache.felix.framework.capabilityset.Requirement;
-import org.apache.felix.framework.ext.VBWire;
-import org.apache.felix.framework.resolver.Wire;
+import org.apache.felix.framework.ext.Wire;
+import org.apache.felix.framework.resolver.ResolverWire;
import org.osgi.framework.Bundle;
import org.osgi.framework.Constants;
@@ -318,13 +318,13 @@ public class Util
return matching;
}
- public static VBWire getWire(Module m, String name)
+ public static Wire getWire(Module m, String name)
{
- List<VBWire> wires = m.getWires();
+ List<Wire> wires = m.getWires();
for (int i = 0; (wires != null) && (i < wires.size()); i++)
{
- if (((Wire)
wires.get(i)).getCapability().getNamespace().equals(Capability.PACKAGE_NAMESPACE)
&&
- ((Wire)
wires.get(i)).getCapability().getAttribute(Capability.PACKAGE_ATTR).getValue().equals(name))
+ if (((ResolverWire)
wires.get(i)).getCapability().getNamespace().equals(Capability.PACKAGE_NAMESPACE)
&&
+ ((ResolverWire)
wires.get(i)).getCapability().getAttribute(Capability.PACKAGE_ATTR).getValue().equals(name))
{
return wires.get(i);
}