Class OkHttpClientFactory
- java.lang.Object
-
- io.fabric8.kubernetes.client.okhttp.OkHttpClientFactory
-
- All Implemented Interfaces:
HttpClient.Factory
public class OkHttpClientFactory extends Object implements HttpClient.Factory
-
-
Constructor Summary
Constructors Constructor Description OkHttpClientFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidadditionalConfig(okhttp3.OkHttpClient.Builder builder)Subclasses may use this to apply additional configuration after the Config has been applied This method is only called for clients constructed using the Config.protected okhttp3.DispatcherinitDispatcher()io.fabric8.kubernetes.client.okhttp.OkHttpClientBuilderImplnewBuilder()io.fabric8.kubernetes.client.okhttp.OkHttpClientBuilderImplnewBuilder(Config config)Creates an HTTP client builder configured to access the Kubernetes API.protected okhttp3.OkHttpClient.BuildernewOkHttpClientBuilder()Subclasses may use this to apply a base configuration to the builderintpriority()protected booleanshouldDisableHttp2()OkHttp wrongfully detects > JDK8u251 as okhttp3.internal.platform.Jdk9Platform which enables Http2 unsupported for JDK8.
-
-
-
Method Detail
-
priority
public int priority()
- Specified by:
priorityin interfaceHttpClient.Factory
-
newOkHttpClientBuilder
protected okhttp3.OkHttpClient.Builder newOkHttpClientBuilder()
Subclasses may use this to apply a base configuration to the builder
-
additionalConfig
protected void additionalConfig(okhttp3.OkHttpClient.Builder builder)
Subclasses may use this to apply additional configuration after the Config has been applied This method is only called for clients constructed using the Config.- Parameters:
builder-
-
newBuilder
public io.fabric8.kubernetes.client.okhttp.OkHttpClientBuilderImpl newBuilder()
- Specified by:
newBuilderin interfaceHttpClient.Factory
-
newBuilder
public io.fabric8.kubernetes.client.okhttp.OkHttpClientBuilderImpl newBuilder(Config config)
Creates an HTTP client builder configured to access the Kubernetes API.- Specified by:
newBuilderin interfaceHttpClient.Factory- Parameters:
config- Kubernetes API client config- Returns:
- returns an HTTP client builder
-
shouldDisableHttp2
protected boolean shouldDisableHttp2()
OkHttp wrongfully detects > JDK8u251 as okhttp3.internal.platform.Jdk9Platform which enables Http2 unsupported for JDK8.- Returns:
- true if JDK8 is detected, false otherwise-
- See Also:
- #2212
-
initDispatcher
protected okhttp3.Dispatcher initDispatcher()
-
-