Search in sources :

Example 1 with Provider

use of com.yahoo.vespa.model.container.search.searchchain.Provider in project vespa by vespa-engine.

the class DomProviderBuilder method buildChain.

@Override
protected Provider buildChain(AbstractConfigProducer ancestor, Element providerElement, ChainSpecification specWithoutInnerComponents) {
    ProviderReader providerReader = new ProviderReader(providerElement);
    if (providerReader.certificateApplicationId == null && providerReader.certificateProxy != null) {
        throw new IllegalArgumentException("Provider '" + specWithoutInnerComponents.componentId + "' must have a certificate application ID, since a certificate store proxy is given");
    }
    FederationOptions federationOptions = readFederationOptions(providerElement);
    Provider provider = buildProvider(specWithoutInnerComponents, providerReader, federationOptions);
    Collection<Source> sources = buildSources(ancestor, providerElement);
    addSources(provider, sources);
    return provider;
}
Also used : FederationOptions(com.yahoo.search.searchchain.model.federation.FederationOptions) Source(com.yahoo.vespa.model.container.search.searchchain.Source) LocalProvider(com.yahoo.vespa.model.container.search.searchchain.LocalProvider) HttpProvider(com.yahoo.vespa.model.container.search.searchchain.HttpProvider) Provider(com.yahoo.vespa.model.container.search.searchchain.Provider)

Example 2 with Provider

use of com.yahoo.vespa.model.container.search.searchchain.Provider 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;
}
Also used : ChainedComponentModel(com.yahoo.component.chain.model.ChainedComponentModel) HttpProviderSearcher(com.yahoo.vespa.model.container.search.searchchain.HttpProviderSearcher) LocalProvider(com.yahoo.vespa.model.container.search.searchchain.LocalProvider) HttpProvider(com.yahoo.vespa.model.container.search.searchchain.HttpProvider) Provider(com.yahoo.vespa.model.container.search.searchchain.Provider)

Aggregations

HttpProvider (com.yahoo.vespa.model.container.search.searchchain.HttpProvider)2 LocalProvider (com.yahoo.vespa.model.container.search.searchchain.LocalProvider)2 Provider (com.yahoo.vespa.model.container.search.searchchain.Provider)2 ChainedComponentModel (com.yahoo.component.chain.model.ChainedComponentModel)1 FederationOptions (com.yahoo.search.searchchain.model.federation.FederationOptions)1 HttpProviderSearcher (com.yahoo.vespa.model.container.search.searchchain.HttpProviderSearcher)1 Source (com.yahoo.vespa.model.container.search.searchchain.Source)1