diff options
Diffstat (limited to 'config-model/src/main/java/com/yahoo/vespa')
10 files changed, 17 insertions, 27 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/Container.java b/config-model/src/main/java/com/yahoo/vespa/model/container/Container.java index 5e95403313c..d075e661149 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/Container.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/Container.java @@ -88,7 +88,7 @@ public abstract class Container extends AbstractService implements this.parent = parent; this.retired = retired; this.index = index; - this.defaultHttpServer = new JettyHttpServer(new ComponentId("DefaultHttpServer"), containerClusterOrNull(parent), isHostedVespa); + this.defaultHttpServer = new JettyHttpServer("DefaultHttpServer", containerClusterOrNull(parent), isHostedVespa); if (getHttp() == null) { addChild(defaultHttpServer); } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java index db4cda8b72e..8868c55becb 100755 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java @@ -173,7 +173,7 @@ public abstract class ContainerCluster<CONTAINER extends Container> componentGroup = new ComponentGroup<>(this, "component"); addComponent(new StatisticsComponent()); - addSimpleComponent(AccessLog.class.getName(), null, "jdisc_http_service"); + addSimpleComponent(AccessLog.class); addComponent(new DefaultThreadpoolProvider(this)); addSimpleComponent(com.yahoo.concurrent.classlock.ClassLocking.class); addSimpleComponent(SecurityFilterInvoker.class); diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/component/ConnectionLogComponent.java b/config-model/src/main/java/com/yahoo/vespa/model/container/component/ConnectionLogComponent.java index 8eff7bf7201..83e06aab703 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/component/ConnectionLogComponent.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/component/ConnectionLogComponent.java @@ -20,7 +20,7 @@ public class ConnectionLogComponent extends SimpleComponent implements Connectio } public ConnectionLogComponent(ContainerCluster<?> cluster, Class<? extends ConnectionLog> cls, String logDirectoryName, String clusterName) { - super(new ComponentModel(cls.getName(), null, "jdisc_http_service", null)); + super(cls.getName()); this.logDirectoryName = logDirectoryName; this.clusterName = clusterName; this.queueSize = queueSize(cluster).orElse(-1); diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/http/ConnectorFactory.java b/config-model/src/main/java/com/yahoo/vespa/model/container/http/ConnectorFactory.java index 67b3ec0f6a7..989f911fc5e 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/http/ConnectorFactory.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/http/ConnectorFactory.java @@ -27,11 +27,9 @@ public class ConnectorFactory extends SimpleComponent implements ConnectorConfig private volatile ComponentId defaultResponseFilterChain; protected ConnectorFactory(Builder builder) { - super(new ComponentModel( - new BundleInstantiationSpecification( - new ComponentId(builder.name), - fromString("com.yahoo.jdisc.http.server.jetty.ConnectorFactory"), - fromString("jdisc_http_service")))); + super(new ComponentModel(builder.name, + com.yahoo.jdisc.http.server.jetty.ConnectorFactory.class.getName(), + null)); this.name = builder.name; this.listenPort = builder.listenPort; this.sslProviderComponent = builder.sslProvider != null ? builder.sslProvider : new DefaultSslProvider(name); diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/http/JettyHttpServer.java b/config-model/src/main/java/com/yahoo/vespa/model/container/http/JettyHttpServer.java index 674d2ce3325..ce79a124e81 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/http/JettyHttpServer.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/http/JettyHttpServer.java @@ -26,15 +26,11 @@ public class JettyHttpServer extends SimpleComponent implements ServerConfig.Pro private volatile boolean isHostedVespa; private final List<ConnectorFactory> connectorFactories = new ArrayList<>(); - public JettyHttpServer(ComponentId id, ContainerCluster<?> cluster, boolean isHostedVespa) { - super(new ComponentModel( - new BundleInstantiationSpecification(id, - fromString("com.yahoo.jdisc.http.server.jetty.JettyHttpServer"), - fromString("jdisc_http_service")) - )); + public JettyHttpServer(String componentId, ContainerCluster<?> cluster, boolean isHostedVespa) { + super(new ComponentModel(componentId, com.yahoo.jdisc.http.server.jetty.JettyHttpServer.class.getName(), null)); this.isHostedVespa = isHostedVespa; this.cluster = cluster; - final FilterBindingsProviderComponent filterBindingsProviderComponent = new FilterBindingsProviderComponent(id); + final FilterBindingsProviderComponent filterBindingsProviderComponent = new FilterBindingsProviderComponent(componentId); addChild(filterBindingsProviderComponent); inject(filterBindingsProviderComponent); } @@ -89,17 +85,17 @@ public class JettyHttpServer extends SimpleComponent implements ServerConfig.Pro } } - static ComponentModel providerComponentModel(final ComponentId parentId, String className) { + static ComponentModel providerComponentModel(String parentId, String className) { final ComponentSpecification classNameSpec = new ComponentSpecification( className); return new ComponentModel(new BundleInstantiationSpecification( - classNameSpec.nestInNamespace(parentId), + classNameSpec.nestInNamespace(new ComponentId(parentId)), classNameSpec, null)); } public static final class FilterBindingsProviderComponent extends SimpleComponent { - public FilterBindingsProviderComponent(final ComponentId parentId) { + public FilterBindingsProviderComponent(String parentId) { super(providerComponentModel(parentId, "com.yahoo.container.jdisc.FilterBindingsProvider")); } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/ConfiguredDirectSslProvider.java b/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/ConfiguredDirectSslProvider.java index 8f5970453a5..690e4376120 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/ConfiguredDirectSslProvider.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/ConfiguredDirectSslProvider.java @@ -17,7 +17,6 @@ import static com.yahoo.jdisc.http.ConnectorConfig.Ssl.ClientAuth; public class ConfiguredDirectSslProvider extends SslProvider { public static final String COMPONENT_ID_PREFIX = "configured-ssl-provider@"; public static final String COMPONENT_CLASS = ConfiguredSslContextFactoryProvider.class.getName(); - public static final String COMPONENT_BUNDLE = "jdisc_http_service"; private final String privateKey; private final String certificate; @@ -26,7 +25,7 @@ public class ConfiguredDirectSslProvider extends SslProvider { private final ClientAuth.Enum clientAuthentication; public ConfiguredDirectSslProvider(String servername, String privateKey, String certificate, String caCertificatePath, String caCertificate, ClientAuth.Enum clientAuthentication) { - super(COMPONENT_ID_PREFIX, servername, COMPONENT_CLASS, COMPONENT_BUNDLE); + super(COMPONENT_ID_PREFIX, servername, COMPONENT_CLASS, null); this.privateKey = privateKey; this.certificate = certificate; this.caCertificatePath = caCertificatePath; diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/ConfiguredFilebasedSslProvider.java b/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/ConfiguredFilebasedSslProvider.java index a19626db8bc..656c7d8e778 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/ConfiguredFilebasedSslProvider.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/ConfiguredFilebasedSslProvider.java @@ -16,7 +16,6 @@ import java.util.Optional; public class ConfiguredFilebasedSslProvider extends SslProvider { public static final String COMPONENT_ID_PREFIX = "configured-ssl-provider@"; public static final String COMPONENT_CLASS = ConfiguredSslContextFactoryProvider.class.getName(); - public static final String COMPONENT_BUNDLE = "jdisc_http_service"; private final String privateKeyPath; private final String certificatePath; @@ -32,7 +31,7 @@ public class ConfiguredFilebasedSslProvider extends SslProvider { String clientAuthentication, List<String> cipherSuites, List<String> protocolVersions) { - super(COMPONENT_ID_PREFIX, servername, COMPONENT_CLASS, COMPONENT_BUNDLE); + super(COMPONENT_ID_PREFIX, servername, COMPONENT_CLASS, null); this.privateKeyPath = privateKeyPath; this.certificatePath = certificatePath; this.caCertificatePath = caCertificatePath; diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/DefaultSslProvider.java b/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/DefaultSslProvider.java index 215c1813e95..6504d8ac653 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/DefaultSslProvider.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/DefaultSslProvider.java @@ -11,10 +11,9 @@ public class DefaultSslProvider extends SslProvider { public static final String COMPONENT_ID_PREFIX = "default-ssl-provider@"; public static final String COMPONENT_CLASS = DefaultSslContextFactoryProvider.class.getName(); - public static final String COMPONENT_BUNDLE = "jdisc_http_service"; public DefaultSslProvider(String serverName) { - super(COMPONENT_ID_PREFIX, serverName, COMPONENT_CLASS, COMPONENT_BUNDLE); + super(COMPONENT_ID_PREFIX, serverName, COMPONENT_CLASS, null); } @Override public void amendConnectorConfig(ConnectorConfig.Builder builder) {} diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/http/xml/JettyHttpServerBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/container/http/xml/JettyHttpServerBuilder.java index f3e82d515df..f0be8ebc29e 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/http/xml/JettyHttpServerBuilder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/http/xml/JettyHttpServerBuilder.java @@ -24,8 +24,7 @@ public class JettyHttpServerBuilder extends VespaDomBuilder.DomConfigProducerBui @Override protected JettyHttpServer doBuild(DeployState deployState, AbstractConfigProducer<?> ancestor, Element http) { - JettyHttpServer jettyHttpServer = new JettyHttpServer( - new ComponentId("jdisc-jetty"), cluster, deployState.isHosted()); + JettyHttpServer jettyHttpServer = new JettyHttpServer("jdisc-jetty", cluster, deployState.isHosted()); for (Element serverSpec: XML.getChildren(http, "server")) { ConnectorFactory connectorFactory = new JettyConnectorBuilder().build(deployState, ancestor, serverSpec); jettyHttpServer.addConnector(connectorFactory); diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java index f2e8757c115..19141bd1f4d 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java @@ -464,7 +464,7 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> { } JettyHttpServer httpServer = cluster.getHttp().getHttpServer().orElse(null); if (httpServer == null) { - httpServer = new JettyHttpServer(new ComponentId("DefaultHttpServer"), cluster, cluster.isHostedVespa()); + httpServer = new JettyHttpServer("DefaultHttpServer", cluster, cluster.isHostedVespa()); cluster.getHttp().setHttpServer(httpServer); } int defaultPort = Defaults.getDefaults().vespaWebServicePort(); |