public SystemBundleLoader(ModuleWiring wiring, EquinoxContainer container, ClassLoader frameworkLoader) { super(wiring, container, frameworkLoader.getParent()); this.classLoader = frameworkLoader; this.moduleClassLoader = new SystemModuleClassLoader(classLoader.getParent(), container.getConfiguration(), this, (Generation) wiring.getRevision().getRevisionInfo()); }
/** * Return a string representation of this loader. * @return String */ public final String toString() { ModuleRevision revision = wiring.getRevision(); String name = revision.getSymbolicName(); if (name == null) name = "unknown"; //$NON-NLS-1$ return name + '_' + revision.getVersion(); }
/** * Return a string representation of this loader. * @return String */ public final String toString() { ModuleRevision revision = wiring.getRevision(); String name = revision.getSymbolicName(); if (name == null) name = "unknown"; //$NON-NLS-1$ return name + '_' + revision.getVersion(); }
/** * Return a string representation of this loader. * @return String */ public final String toString() { ModuleRevision revision = wiring.getRevision(); String name = revision.getSymbolicName(); if (name == null) name = "unknown"; //$NON-NLS-1$ return name + '_' + revision.getVersion(); }
/** * Return a string representation of this loader. * @return String */ public final String toString() { ModuleRevision revision = wiring.getRevision(); String name = revision.getSymbolicName(); if (name == null) name = "unknown"; //$NON-NLS-1$ return name + '_' + revision.getVersion(); }
public SystemBundleLoader(ModuleWiring wiring, EquinoxContainer container, ClassLoader frameworkLoader) { super(wiring, container, frameworkLoader.getParent()); this.classLoader = frameworkLoader; this.moduleClassLoader = new SystemModuleClassLoader(classLoader.getParent(), container.getConfiguration(), this, (Generation) wiring.getRevision().getRevisionInfo()); }
public SystemBundleLoader(ModuleWiring wiring, EquinoxContainer container, ClassLoader frameworkLoader) { super(wiring, container, frameworkLoader.getParent()); this.classLoader = frameworkLoader; this.moduleClassLoader = new SystemModuleClassLoader(classLoader.getParent(), container.getConfiguration(), this, (Generation) wiring.getRevision().getRevisionInfo()); }
DynamicFragments(ModuleWiring hostWiring, ModuleCapability hostCapability) { this.hostCapability = hostCapability; validProviders.add(hostWiring.getRevision()); for (ModuleWire hostWire : hostWiring.getProvidedModuleWires(HostNamespace.HOST_NAMESPACE)) { validProviders.add(hostWire.getRequirer()); fragments.put(hostWire.getRequirer().getSymbolicName(), hostWire.getRequirer()); } }
@Override public ModuleLoader createModuleLoader(ModuleWiring wiring) { if (wiring.getBundle().getBundleId() == 0) { ClassLoader cl = EquinoxContainer.class.getClassLoader(); cl = cl == null ? BOOT_CLASSLOADER : cl; return new SystemBundleLoader(wiring, container, cl); } if ((wiring.getRevision().getTypes() & BundleRevision.TYPE_FRAGMENT) != 0) { return new FragmentLoader(); } return new BundleLoader(wiring, container, moduleClassLoaderParent); }
@Override public ModuleLoader call() throws Exception { if (!isValid) { return null; } return getRevision().getRevisions().getContainer().adaptor.createModuleLoader(ModuleWiring.this); } }
@Override public ModuleLoader createModuleLoader(ModuleWiring wiring) { if (wiring.getBundle().getBundleId() == 0) { ClassLoader cl = EquinoxContainer.class.getClassLoader(); cl = cl == null ? BOOT_CLASSLOADER : cl; return new SystemBundleLoader(wiring, container, cl); } if ((wiring.getRevision().getTypes() & BundleRevision.TYPE_FRAGMENT) != 0) { return new FragmentLoader(); } return new BundleLoader(wiring, container, moduleClassLoaderParent); }
@Override public ModuleLoader call() throws Exception { if (!isValid) { return null; } return getRevision().getRevisions().getContainer().adaptor.createModuleLoader(ModuleWiring.this); } }
private void clearManifestCache(ModuleWiring moduleWiring) { boolean frameworkActive = Module.ACTIVE_SET.contains(storage.getModuleContainer().getModule(0).getState()); ModuleRevision revision = moduleWiring.getRevision(); Module module = revision.getRevisions().getModule(); boolean isUninstallingOrUninstalled = State.UNINSTALLED.equals(module.getState()) ^ module.holdsTransitionEventLock(ModuleEvent.UNINSTALLED); if (!frameworkActive || !isUninstallingOrUninstalled) { // only do this when the framework is not active or when the bundle is not uninstalled Generation generation = (Generation) moduleWiring.getRevision().getRevisionInfo(); generation.clearManifestCache(); } }
private void clearManifestCache(ModuleWiring moduleWiring) { boolean frameworkActive = Module.ACTIVE_SET.contains(storage.getModuleContainer().getModule(0).getState()); ModuleRevision revision = moduleWiring.getRevision(); Module module = revision.getRevisions().getModule(); boolean isUninstallingOrUninstalled = State.UNINSTALLED.equals(module.getState()) ^ module.holdsTransitionEventLock(ModuleEvent.UNINSTALLED); if (!frameworkActive || !isUninstallingOrUninstalled) { // only do this when the framework is not active or when the bundle is not uninstalled Generation generation = (Generation) moduleWiring.getRevision().getRevisionInfo(); generation.clearManifestCache(); } }
protected void clearManifestLocalizationCache() { Generation hostGen = (Generation) wiring.getRevision().getRevisionInfo(); hostGen.clearManifestCache(); List<ModuleWire> hostWires = wiring.getProvidedModuleWires(HostNamespace.HOST_NAMESPACE); // doing a null check because there is no lock on the module database here if (hostWires != null) { for (ModuleWire fragmentWire : hostWires) { Generation fragGen = (Generation) fragmentWire.getRequirer().getRevisionInfo(); fragGen.clearManifestCache(); } } }
protected void clearManifestLocalizationCache() { Generation hostGen = (Generation) wiring.getRevision().getRevisionInfo(); hostGen.clearManifestCache(); for (ModuleWire fragmentWire : wiring.getProvidedModuleWires(HostNamespace.HOST_NAMESPACE)) { Generation fragGen = (Generation) fragmentWire.getRequirer().getRevisionInfo(); fragGen.clearManifestCache(); } }
protected void clearManifestLocalizationCache() { Generation hostGen = (Generation) wiring.getRevision().getRevisionInfo(); hostGen.clearManifestCache(); for (ModuleWire fragmentWire : wiring.getProvidedModuleWires(HostNamespace.HOST_NAMESPACE)) { Generation fragGen = (Generation) fragmentWire.getRequirer().getRevisionInfo(); fragGen.clearManifestCache(); } }
protected void clearManifestLocalizationCache() { Generation hostGen = (Generation) wiring.getRevision().getRevisionInfo(); hostGen.clearManifestCache(); List<ModuleWire> hostWires = wiring.getProvidedModuleWires(HostNamespace.HOST_NAMESPACE); // doing a null check because there is no lock on the module database here if (hostWires != null) { for (ModuleWire fragmentWire : hostWires) { Generation fragGen = (Generation) fragmentWire.getRequirer().getRevisionInfo(); fragGen.clearManifestCache(); } } }
@Override public void loadFragments(Collection<ModuleRevision> fragments) { Module systemModule = getWiring().getRevision().getRevisions().getModule(); try { this.getGeneration().getBundleInfo().getStorage().getExtensionInstaller().addExtensionContent(fragments, systemModule); } catch (BundleException e) { systemModule.getContainer().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, systemModule, e); } getClasspathManager().loadFragments(fragments); } }
@Override public void loadFragments(Collection<ModuleRevision> fragments) { Module systemModule = getWiring().getRevision().getRevisions().getModule(); try { this.getGeneration().getBundleInfo().getStorage().getExtensionInstaller().addExtensionContent(fragments, systemModule); } catch (BundleException e) { systemModule.getContainer().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, systemModule, e); } getClasspathManager().loadFragments(fragments); } }