diff options
author | jonmv <venstad@gmail.com> | 2023-10-05 16:56:47 +0200 |
---|---|---|
committer | jonmv <venstad@gmail.com> | 2023-10-05 16:56:47 +0200 |
commit | 1031323b5f08f02e25c79a8653987ed7d70e12a6 (patch) | |
tree | 3db700aa4a8be893136dd8f87ed6f0d794561fdf /config-model/src/main | |
parent | 4442e0ebf35867a85128088471be38afc61e0ef0 (diff) |
Isolate inner jetty server component from wrapper with filters
Diffstat (limited to 'config-model/src/main')
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/container/http/JettyHttpServer.java | 11 |
1 files changed, 6 insertions, 5 deletions
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 0388230fa6a..1ab01839ef1 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 @@ -32,9 +32,11 @@ public class JettyHttpServer extends SimpleComponent implements ServerConfig.Pro super(new ComponentModel(componentId, com.yahoo.jdisc.http.server.jetty.JettyHttpServer.class.getName(), null)); this.isHostedVespa = deployState.isHosted(); this.cluster = cluster; - final FilterBindingsProviderComponent filterBindingsProviderComponent = new FilterBindingsProviderComponent(componentId); + FilterBindingsProviderComponent filterBindingsProviderComponent = new FilterBindingsProviderComponent(componentId); addChild(filterBindingsProviderComponent); - inject(filterBindingsProviderComponent); + addChild(new SimpleComponent(childComponentModel(componentId, com.yahoo.jdisc.http.server.jetty.JettyHttpServerContext.class.getName())) { + { inject(filterBindingsProviderComponent); } + }); for (String agent : deployState.featureFlags().ignoredHttpUserAgents()) { addIgnoredUserAgent(agent); } @@ -79,7 +81,7 @@ public class JettyHttpServer extends SimpleComponent implements ServerConfig.Pro } } - static ComponentModel providerComponentModel(String parentId, String className) { + static ComponentModel childComponentModel(String parentId, String className) { final ComponentSpecification classNameSpec = new ComponentSpecification( className); return new ComponentModel(new BundleInstantiationSpecification( @@ -90,9 +92,8 @@ public class JettyHttpServer extends SimpleComponent implements ServerConfig.Pro public static final class FilterBindingsProviderComponent extends SimpleComponent { public FilterBindingsProviderComponent(String parentId) { - super(providerComponentModel(parentId, "com.yahoo.container.jdisc.FilterBindingsProvider")); + super(childComponentModel(parentId, "com.yahoo.container.jdisc.FilterBindingsProvider")); } - } } |