Package co.featbit.server.exterior
Interface HttpConfig
public interface HttpConfig
Interface to encapsulate top-level HTTP configuration that applies to all SDK components.
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.
-
Method Summary
Modifier and TypeMethodDescriptionokhttp3.AuthenticatorThe authentication method to use for a proxy, if any.The connection timeout.headers()Returns the basic headers that should be added to all HTTP requests from SDK components to FeatBit API, based on the current SDK configuration.proxy()The proxy configuration, if any.The configured socket factory for insecure connections.this param is not used in streamingThe configured socket factory for secure connections.The configured trust manager for secure connections, if custom certificate verification is needed.
-
Method Details
-
connectTime
Duration connectTime()The connection timeout. This is the time allowed for the HTTP client to connect to the server.- Returns:
- the connection timeout;
-
socketTime
Duration socketTime()this param is not used in streaming- Returns:
- read and write time out
-
proxy
Proxy proxy()The proxy configuration, if any.- Returns:
- a
Proxyinstance or null
-
authenticator
okhttp3.Authenticator authenticator()The authentication method to use for a proxy, if any. Ignored ifproxy()is null.- Returns:
- an
Authenticatorimplementation or null
-
socketFactory
SocketFactory socketFactory()The configured socket factory for insecure connections.- Returns:
- a SocketFactory or null
-
sslSocketFactory
SSLSocketFactory sslSocketFactory()The configured socket factory for secure connections.- Returns:
- a SSLSocketFactory or null
-
trustManager
X509TrustManager trustManager()The configured trust manager for secure connections, if custom certificate verification is needed.- Returns:
- an X509TrustManager or null
-
headers
Returns the basic headers that should be added to all HTTP requests from SDK components to FeatBit API, based on the current SDK configuration.- Returns:
- a list of HTTP header names and values
-