aboutsummaryrefslogtreecommitdiffstats
path: root/vespa-feed-client-api
diff options
context:
space:
mode:
Diffstat (limited to 'vespa-feed-client-api')
-rw-r--r--vespa-feed-client-api/abi-spec.json5
-rw-r--r--vespa-feed-client-api/src/main/java/ai/vespa/feed/client/FeedClientBuilder.java21
2 files changed, 26 insertions, 0 deletions
diff --git a/vespa-feed-client-api/abi-spec.json b/vespa-feed-client-api/abi-spec.json
index 469928d819c..e8c2b4a3c9e 100644
--- a/vespa-feed-client-api/abi-spec.json
+++ b/vespa-feed-client-api/abi-spec.json
@@ -146,9 +146,12 @@
"public abstract ai.vespa.feed.client.FeedClientBuilder setMaxStreamPerConnection(int)",
"public abstract ai.vespa.feed.client.FeedClientBuilder setSslContext(javax.net.ssl.SSLContext)",
"public abstract ai.vespa.feed.client.FeedClientBuilder setHostnameVerifier(javax.net.ssl.HostnameVerifier)",
+ "public abstract ai.vespa.feed.client.FeedClientBuilder setProxyHostnameVerifier(javax.net.ssl.HostnameVerifier)",
"public abstract ai.vespa.feed.client.FeedClientBuilder noBenchmarking()",
"public abstract ai.vespa.feed.client.FeedClientBuilder addRequestHeader(java.lang.String, java.lang.String)",
"public abstract ai.vespa.feed.client.FeedClientBuilder addRequestHeader(java.lang.String, java.util.function.Supplier)",
+ "public abstract ai.vespa.feed.client.FeedClientBuilder addProxyRequestHeader(java.lang.String, java.lang.String)",
+ "public abstract ai.vespa.feed.client.FeedClientBuilder addProxyRequestHeader(java.lang.String, java.util.function.Supplier)",
"public abstract ai.vespa.feed.client.FeedClientBuilder setRetryStrategy(ai.vespa.feed.client.FeedClient$RetryStrategy)",
"public abstract ai.vespa.feed.client.FeedClientBuilder setCircuitBreaker(ai.vespa.feed.client.FeedClient$CircuitBreaker)",
"public abstract ai.vespa.feed.client.FeedClientBuilder setCertificate(java.nio.file.Path, java.nio.file.Path)",
@@ -157,7 +160,9 @@
"public abstract ai.vespa.feed.client.FeedClientBuilder setDryrun(boolean)",
"public abstract ai.vespa.feed.client.FeedClientBuilder setSpeedTest(boolean)",
"public abstract ai.vespa.feed.client.FeedClientBuilder setCaCertificatesFile(java.nio.file.Path)",
+ "public abstract ai.vespa.feed.client.FeedClientBuilder setProxyCaCertificatesFile(java.nio.file.Path)",
"public abstract ai.vespa.feed.client.FeedClientBuilder setCaCertificates(java.util.Collection)",
+ "public abstract ai.vespa.feed.client.FeedClientBuilder setProxyCaCertificates(java.util.Collection)",
"public abstract ai.vespa.feed.client.FeedClientBuilder setEndpointUris(java.util.List)",
"public abstract ai.vespa.feed.client.FeedClientBuilder setProxy(java.net.URI)",
"public abstract ai.vespa.feed.client.FeedClientBuilder setCompression(ai.vespa.feed.client.FeedClientBuilder$Compression)",
diff --git a/vespa-feed-client-api/src/main/java/ai/vespa/feed/client/FeedClientBuilder.java b/vespa-feed-client-api/src/main/java/ai/vespa/feed/client/FeedClientBuilder.java
index 02dabaf9ef8..b5b6874ded9 100644
--- a/vespa-feed-client-api/src/main/java/ai/vespa/feed/client/FeedClientBuilder.java
+++ b/vespa-feed-client-api/src/main/java/ai/vespa/feed/client/FeedClientBuilder.java
@@ -69,6 +69,9 @@ public interface FeedClientBuilder {
/** Sets {@link HostnameVerifier} instance (e.g for disabling default SSL hostname verification). */
FeedClientBuilder setHostnameVerifier(HostnameVerifier verifier);
+ /** Sets {@link HostnameVerifier} instance for proxy (e.g for disabling default SSL hostname verification). */
+ FeedClientBuilder setProxyHostnameVerifier(HostnameVerifier verifier);
+
/** Turns off benchmarking. Attempting to get {@link FeedClient#stats()} will result in an exception. */
FeedClientBuilder noBenchmarking();
@@ -81,6 +84,15 @@ public interface FeedClientBuilder {
*/
FeedClientBuilder addRequestHeader(String name, Supplier<String> valueSupplier);
+ /** Adds HTTP request header to all proxy requests. */
+ FeedClientBuilder addProxyRequestHeader(String name, String value);
+
+ /**
+ * Adds HTTP request header to all proxy requests. Value {@link Supplier} is invoked for each HTTP request,
+ * i.e. value can be dynamically updated for each new proxy connection.
+ */
+ FeedClientBuilder addProxyRequestHeader(String name, Supplier<String> valueSupplier);
+
/**
* Overrides default retry strategy.
* @see FeedClient.RetryStrategy
@@ -114,9 +126,18 @@ public interface FeedClientBuilder {
*/
FeedClientBuilder setCaCertificatesFile(Path caCertificatesFile);
+ /**
+ * Overrides JVM default SSL truststore for proxy
+ * @param caCertificatesFile Path to PEM encoded file containing trusted certificates
+ */
+ FeedClientBuilder setProxyCaCertificatesFile(Path caCertificatesFile);
+
/** Overrides JVM default SSL truststore */
FeedClientBuilder setCaCertificates(Collection<X509Certificate> caCertificates);
+ /** Overrides JVM default SSL truststore for proxy */
+ FeedClientBuilder setProxyCaCertificates(Collection<X509Certificate> caCertificates);
+
/** Overrides endpoint URIs for this client */
FeedClientBuilder setEndpointUris(List<URI> endpoints);