public interface HttpConfiguration
Use HttpConfigurationBuilder
to construct an instance.
The SDK's built-in components use OkHttp as the HTTP client implementation, but since OkHttp types are not surfaced in the public API and custom components might use some other implementation, this class only provides the properties that would be used to create an HTTP client; it does not create the client itself. SDK implementation code uses its own helper methods to do so.
Modifier and Type | Method and Description |
---|---|
java.time.Duration |
getConnectTimeout()
The connection timeout.
|
java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.String>> |
getDefaultHeaders()
Returns the basic headers that should be added to all HTTP requests from SDK components to
LaunchDarkly services, based on the current SDK configuration.
|
java.net.Proxy |
getProxy()
The proxy configuration, if any.
|
HttpAuthentication |
getProxyAuthentication()
The authentication method to use for a proxy, if any.
|
java.time.Duration |
getSocketTimeout()
The socket timeout.
|
javax.net.ssl.SSLSocketFactory |
getSslSocketFactory()
The configured socket factory for secure connections.
|
javax.net.ssl.X509TrustManager |
getTrustManager()
The configured trust manager for secure connections, if custom certificate verification is needed.
|
java.time.Duration getConnectTimeout()
java.net.Proxy getProxy()
Proxy
instance or nullHttpAuthentication getProxyAuthentication()
getProxy()
is null.HttpAuthentication
implementation or nulljava.time.Duration getSocketTimeout()
Components.streamingDataSource()
, which has its own
non-configurable read timeout based on the expected behavior of the LaunchDarkly streaming service.javax.net.ssl.SSLSocketFactory getSslSocketFactory()
javax.net.ssl.X509TrustManager getTrustManager()
java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.String>> getDefaultHeaders()