use of com.yahoo.component.chain.model.ChainedComponentModel in project vespa by vespa-engine.
the class ChainsConfigurer method initDependencies.
private static <COMPONENT extends ChainedComponent> void initDependencies(ChainsModel model, ComponentRegistry<COMPONENT> allComponents) {
for (ChainedComponentModel componentModel : model.allComponents()) {
COMPONENT component = getComponentOrThrow(allComponents, componentModel.getComponentId().toSpecification());
component.initDependencies(componentModel.dependencies);
}
}
use of com.yahoo.component.chain.model.ChainedComponentModel in project vespa by vespa-engine.
the class DomProviderBuilder method buildHttpProvider.
private Provider buildHttpProvider(ChainSpecification specWithoutInnerSearchers, ProviderReader providerReader, FederationOptions federationOptions) {
ensureEmpty(specWithoutInnerSearchers.componentId, providerReader.clusterName);
Provider httpProvider = buildEmptyHttpProvider(specWithoutInnerSearchers, providerReader, federationOptions);
httpProvider.addInnerComponent(new HttpProviderSearcher(new ChainedComponentModel(HttpProviderSpec.toBundleInstantiationSpecification(HttpProviderSpec.Type.valueOf(providerReader.type)), Dependencies.emptyDependencies())));
return httpProvider;
}
use of com.yahoo.component.chain.model.ChainedComponentModel in project vespa by vespa-engine.
the class DomSearcherBuilderTest method ensureCorrectModel.
@Test
public void ensureCorrectModel() {
ChainedComponent<ChainedComponentModel> searcher = new DomSearcherBuilder().doBuild(root, parse("<searcher id='theId' class='theclassid' bundle='thebundle' provides='p1'>", " <provides>p2</provides>", "</searcher>"));
ChainedComponentModel model = searcher.model;
assertEquals(2, model.dependencies.provides().size());
BundleInstantiationSpecification instantiationSpecification = model.bundleInstantiationSpec;
assertEquals("theId", instantiationSpecification.id.stringValue());
assertEquals("theclassid", instantiationSpecification.classId.stringValue());
assertEquals("thebundle", instantiationSpecification.bundle.stringValue());
}
Aggregations