Package zendesk.core
Class CustomNetworkConfig
- java.lang.Object
-
- zendesk.core.CustomNetworkConfig
-
public abstract class CustomNetworkConfig extends java.lang.Object
Abstract class for customising network configuration, to be used by Zendesk SDKs in conjunction withRestServiceProvider#createRestService(Class, CustomNetworkConfig)
. It provides a way to add custom configuration to theOkHttpClient
andRetrofit
objects used to power a generated Retrofit service API class, through implementing the configuration methods. Both are empty by default. This class should not be used directly by integrators.
-
-
Constructor Summary
Constructors Constructor and Description CustomNetworkConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
configureOkHttpClient(OkHttpClient.Builder builder)
Add custom configuration to theOkHttpClient.Builder
which will be used by the object returned byRestServiceProvider#createRestService(Class, CustomNetworkConfig)
.void
configureRetrofit(Retrofit.Builder builder)
Add custom configuration to theRetrofit.Builder
which will be used by the object returned byRestServiceProvider#createRestService(Class, CustomNetworkConfig)
.
-
-
-
Method Detail
-
configureOkHttpClient
public void configureOkHttpClient(OkHttpClient.Builder builder)
Add custom configuration to theOkHttpClient.Builder
which will be used by the object returned byRestServiceProvider#createRestService(Class, CustomNetworkConfig)
.- Parameters:
builder
- aOkHttpClient.Builder
with starting configuration from the Zendesk Core SDK.
-
configureRetrofit
public void configureRetrofit(Retrofit.Builder builder)
Add custom configuration to theRetrofit.Builder
which will be used by the object returned byRestServiceProvider#createRestService(Class, CustomNetworkConfig)
.- Parameters:
builder
- aRetrofit.Builder
with starting configuration from the Zendesk Core SDK.
-
-