aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/CustomSslProvider.java
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2020-10-19 15:31:21 +0200
committerBjørn Christian Seime <bjorncs@verizonmedia.com>2020-10-19 15:31:21 +0200
commit64dbd6d203149b614faf9f5100dca6fca2382c39 (patch)
treeaf6539fd8c6db8010f4d5be990fd04e1c7c68293 /config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/CustomSslProvider.java
parentb2681968b4bf62c5b89cc0132542ab0519d5e70a (diff)
Remove duplicate connector config generated by ssl provider implementations
Change ssl providers to modify the parent connector's config instead of generating its own connector config.
Diffstat (limited to 'config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/CustomSslProvider.java')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/CustomSslProvider.java15
1 files changed, 3 insertions, 12 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/CustomSslProvider.java b/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/CustomSslProvider.java
index bc211925576..5083cf228e6 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/CustomSslProvider.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/CustomSslProvider.java
@@ -1,29 +1,20 @@
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.model.container.http.ssl;
-import com.yahoo.component.ComponentId;
-import com.yahoo.container.bundle.BundleInstantiationSpecification;
import com.yahoo.jdisc.http.ConnectorConfig;
-import com.yahoo.osgi.provider.model.ComponentModel;
-import com.yahoo.vespa.model.container.component.SimpleComponent;
-
-import static com.yahoo.component.ComponentSpecification.fromString;
/**
* @author mortent
*/
-public class CustomSslProvider extends SimpleComponent implements ConnectorConfig.Producer {
+public class CustomSslProvider extends SslProvider {
public static final String COMPONENT_ID_PREFIX = "ssl-provider@";
public CustomSslProvider(String serverName, String className, String bundle) {
- super(new ComponentModel(
- new BundleInstantiationSpecification(new ComponentId(COMPONENT_ID_PREFIX + serverName),
- fromString(className),
- fromString(bundle))));
+ super(COMPONENT_ID_PREFIX, serverName, className, bundle);
}
@Override
- public void getConfig(ConnectorConfig.Builder builder) {
+ public void amendConnectorConfig(ConnectorConfig.Builder builder) {
builder.ssl.enabled(true);
}
}