public DefaultBootstrapper(BootConfiguration configuration) { runtime = configuration.getRuntime(); systemConfig = configuration.getSystemConfig(); hostClassLoader = configuration.getHostClassLoader(); bootClassLoader = configuration.getBootClassLoader(); exportedPackages = configuration.getExportedPackages(); hostCapabilities = configuration.getHostCapabilities(); registrations = configuration.getRegistrations(); // create disposable components needed to bootstrap the runtime IntrospectionHelper helper = new DefaultIntrospectionHelper(); contractProcessor = new JavaContractProcessorImpl(helper); instantiator = new AtomicComponentInstantiatorImpl(); implementationIntrospector = BootstrapIntrospectionFactory.createSystemImplementationProcessor(); }
BootConfiguration configuration = new BootConfiguration(); configuration.setRuntime(runtime); configuration.setHostClassLoader(maskingHostLoader); configuration.setBootClassLoader(maskingBootLoader); configuration.setSystemConfig(systemConfig); configuration.setExtensionContributions(scannedExtensions.sources); configuration.addRegistrations(registrations);
public DefaultCoordinator(BootConfiguration configuration) { this.configuration = configuration; runtime = configuration.getRuntime(); }
/** * Loads runtime extensions. * * @throws Fabric3Exception if an error loading runtime extensions */ private void loadExtensions() throws Fabric3Exception { List<ContributionSource> contributions = configuration.getExtensionContributions(); ContributionService contributionService = runtime.getComponent(ContributionService.class); Domain domain = runtime.getComponent(Domain.class, RUNTIME_DOMAIN_SERVICE_URI); try { // process manifests and order the contributions ContributionOrder order = contributionService.processManifests(contributions); order.getBootstrapContributions().forEach(contributionService::processContents); // base contributions are deployed in batch since they only rely on boot runtime capabilities domain.include(order.getBootstrapContributions()); order.getBaseContributions().forEach(contributionService::processContents); // base contributions are deployed in batch since they only rely on boot runtime capabilities domain.include(order.getBaseContributions()); // Isolated contributions must be introspected and deployed individually as they rely on capabilities provided by another contribution. // In this case, the providing contribution must be installed and deployed first, precluding batch deployment for (URI uri : order.getIsolatedContributions()) { contributionService.processContents(uri); domain.include(Collections.singletonList(uri)); } } finally { state = RuntimeState.ERROR; } }
public DefaultCoordinator(BootConfiguration configuration) { this.configuration = configuration; runtime = configuration.getRuntime(); }
/** * Loads runtime extensions. * * @throws Fabric3Exception if an error loading runtime extensions */ private void loadExtensions() throws Fabric3Exception { List<ContributionSource> contributions = configuration.getExtensionContributions(); ContributionService contributionService = runtime.getComponent(ContributionService.class); Domain domain = runtime.getComponent(Domain.class, RUNTIME_DOMAIN_SERVICE_URI); try { // process manifests and order the contributions ContributionOrder order = contributionService.processManifests(contributions); order.getBootstrapContributions().forEach(contributionService::processContents); // base contributions are deployed in batch since they only rely on boot runtime capabilities domain.include(order.getBootstrapContributions()); order.getBaseContributions().forEach(contributionService::processContents); // base contributions are deployed in batch since they only rely on boot runtime capabilities domain.include(order.getBaseContributions()); // Isolated contributions must be introspected and deployed individually as they rely on capabilities provided by another contribution. // In this case, the providing contribution must be installed and deployed first, precluding batch deployment for (URI uri : order.getIsolatedContributions()) { contributionService.processContents(uri); domain.include(Collections.singletonList(uri)); } } finally { state = RuntimeState.ERROR; } }
public DefaultBootstrapper(BootConfiguration configuration) { runtime = configuration.getRuntime(); systemConfig = configuration.getSystemConfig(); hostClassLoader = configuration.getHostClassLoader(); bootClassLoader = configuration.getBootClassLoader(); exportedPackages = configuration.getExportedPackages(); hostCapabilities = configuration.getHostCapabilities(); registrations = configuration.getRegistrations(); // create disposable components needed to bootstrap the runtime IntrospectionHelper helper = new DefaultIntrospectionHelper(); contractProcessor = new JavaContractProcessorImpl(helper); instantiator = new AtomicComponentInstantiatorImpl(); implementationIntrospector = BootstrapIntrospectionFactory.createSystemImplementationProcessor(); }