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 Details

    • apiClientFactory

      protected final ApiClientFactory 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 used
      apiClientFactory - the api client factory used to instantiate ApiClient instances.
  • Method Details

    • getBasePath

      public String getBasePath()
      Specified by:
      getBasePath in interface com.symphony.bdk.http.api.ApiClient
    • setBasePath

      public void setBasePath(String basePath)
      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 interface com.symphony.bdk.http.api.ApiClient
    • parameterToString

      public String parameterToString(Object param)
      Specified by:
      parameterToString in interface com.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 interface com.symphony.bdk.http.api.ApiClient
    • selectHeaderAccept

      public String selectHeaderAccept(String... accepts)
      Specified by:
      selectHeaderAccept in interface com.symphony.bdk.http.api.ApiClient
    • selectHeaderContentType

      public String selectHeaderContentType(String... contentTypes)
      Specified by:
      selectHeaderContentType in interface com.symphony.bdk.http.api.ApiClient
    • escapeString

      public String escapeString(String str)
      Specified by:
      escapeString in interface com.symphony.bdk.http.api.ApiClient
    • getAuthentications

      public Map<String,com.symphony.bdk.http.api.auth.Authentication> getAuthentications()
      Specified by:
      getAuthentications in interface com.symphony.bdk.http.api.ApiClient
    • addEnforcedAuthenticationScheme

      public void addEnforcedAuthenticationScheme(String name)
      Specified by:
      addEnforcedAuthenticationScheme in interface com.symphony.bdk.http.api.ApiClient