Class LoadBalancedApiClient
java.lang.Object
com.symphony.bdk.core.client.loadbalancing.LoadBalancedApiClient
- All Implemented Interfaces:
com.symphony.bdk.http.api.ApiClient
- Direct Known Subclasses:
DatafeedLoadBalancedApiClient
,RegularLoadBalancedApiClient
@API(status=INTERNAL)
public abstract class LoadBalancedApiClient
extends Object
implements com.symphony.bdk.http.api.ApiClient
An
ApiClient
implementation which load balances calls across several base URLs.
It contains an ApiClient
(a non load-balanced api client) in order to target a specific base URL.-
Field Summary
Modifier and TypeFieldDescriptionprotected com.symphony.bdk.http.api.ApiClient
protected final ApiClientFactory
protected final com.symphony.bdk.core.config.model.BdkLoadBalancingConfig
-
Constructor Summary
ConstructorDescriptionLoadBalancedApiClient
(com.symphony.bdk.core.config.model.BdkConfig config, ApiClientFactory apiClientFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
escapeString
(String str) List<com.symphony.bdk.http.api.Pair>
parameterToPairs
(String collectionFormat, String name, Object value) parameterToString
(Object param) void
rotate()
selectHeaderAccept
(String... accepts) selectHeaderContentType
(String... contentTypes) void
setBasePath
(String basePath) This makes the api client target the provided basePath.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.symphony.bdk.http.api.ApiClient
invokeAPI
-
Field Details
-
apiClientFactory
-
apiClient
protected com.symphony.bdk.http.api.ApiClient apiClient -
loadBalancingConfig
protected final com.symphony.bdk.core.config.model.BdkLoadBalancingConfig loadBalancingConfig
-
-
Constructor Details
-
LoadBalancedApiClient
public LoadBalancedApiClient(com.symphony.bdk.core.config.model.BdkConfig config, ApiClientFactory apiClientFactory) - Parameters:
config
- the bdk configuration to be usedapiClientFactory
- the api client factory used to instantiateApiClient
instances.
-
-
Method Details
-
getBasePath
- Specified by:
getBasePath
in interfacecom.symphony.bdk.http.api.ApiClient
-
setBasePath
This makes the api client target the provided basePath. It creates a new underlying RegularApiClient targeting the provided basePath.- Parameters:
basePath
- the base URL to target.
-
rotate
public void rotate()- Specified by:
rotate
in interfacecom.symphony.bdk.http.api.ApiClient
-
parameterToString
- Specified by:
parameterToString
in interfacecom.symphony.bdk.http.api.ApiClient
-
parameterToPairs
public List<com.symphony.bdk.http.api.Pair> parameterToPairs(String collectionFormat, String name, Object value) - Specified by:
parameterToPairs
in interfacecom.symphony.bdk.http.api.ApiClient
-
selectHeaderAccept
- Specified by:
selectHeaderAccept
in interfacecom.symphony.bdk.http.api.ApiClient
-
selectHeaderContentType
- Specified by:
selectHeaderContentType
in interfacecom.symphony.bdk.http.api.ApiClient
-
escapeString
- Specified by:
escapeString
in interfacecom.symphony.bdk.http.api.ApiClient
-
getAuthentications
- Specified by:
getAuthentications
in interfacecom.symphony.bdk.http.api.ApiClient
-
addEnforcedAuthenticationScheme
- Specified by:
addEnforcedAuthenticationScheme
in interfacecom.symphony.bdk.http.api.ApiClient
-