Package ai.vespa.util.http.hc4
Class VespaHttpClientBuilder
java.lang.Object
ai.vespa.util.http.hc4.VespaHttpClientBuilder
Http client builder for internal Vespa communications over http/https.
Notes:
- hostname verification is not enabled - CN/SAN verification is assumed to be handled by the underlying x509 trust manager.
- custom connection managers must be configured through
createBuilder(ConnectionManagerFactory)
. Do not call HttpClientBuilder.setConnectionManager(HttpClientConnectionManager)
.- Author:
- bjorncs
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.http.impl.client.HttpClientBuilder
create()
Create a client builder with default connection manager.static org.apache.http.impl.client.HttpClientBuilder
create
(VespaHttpClientBuilder.ConnectionManagerFactory connectionManagerFactory) Create a client builder with a user specified connection manager.static org.apache.http.impl.client.HttpClientBuilder
Creates a client builder with aBasicHttpClientConnectionManager
configured.
-
Method Details
-
create
public static org.apache.http.impl.client.HttpClientBuilder create()Create a client builder with default connection manager. -
create
public static org.apache.http.impl.client.HttpClientBuilder create(VespaHttpClientBuilder.ConnectionManagerFactory connectionManagerFactory) Create a client builder with a user specified connection manager. -
createWithBasicConnectionManager
public static org.apache.http.impl.client.HttpClientBuilder createWithBasicConnectionManager()Creates a client builder with aBasicHttpClientConnectionManager
configured. This connection manager uses a single connection for all requests. See Javadoc for details.
-