use of com.yahoo.component.ComponentSpecification in project vespa by vespa-engine.
the class FederationSearcher method addDefaultTargets.
private void addDefaultTargets(TargetResolver targetResolver, ComponentRegistry<SearchChain> searchChainRegistry) {
for (GenericTarget genericTarget : defaultTargets(searchChainRegistry.allComponents())) {
ComponentSpecification specification = genericTarget.getComponentId().toSpecification();
// Can't use genericTarget directly, as it might be part of a source group.
Target federationTarget = targetResolver.resolve(new TargetSpec(specification, new FederationOptions()));
// Do not replace manually added sources, as they might have manually configured federation options
if (!resolvedTargets.containsKey(federationTarget.id))
resolvedTargets.put(federationTarget.id, federationTarget);
}
}
use of com.yahoo.component.ComponentSpecification in project vespa by vespa-engine.
the class HttpBuilder method readFilterBindings.
private List<Binding> readFilterBindings(Element filteringSpec) {
List<Binding> result = new ArrayList<>();
for (Element child : XML.getChildren(filteringSpec)) {
String tagName = child.getTagName();
if ((tagName.equals("request-chain") || tagName.equals("response-chain"))) {
ComponentSpecification chainId = XmlHelper.getIdRef(child);
for (Element bindingSpec : XML.getChildren(child, "binding")) {
String binding = XML.getValue(bindingSpec);
result.add(new Binding(chainId, binding));
}
}
}
return result;
}
Aggregations