Class ApiClientFactory

java.lang.Object
com.symphony.bdk.core.client.ApiClientFactory

@API(status=EXPERIMENTAL) public class ApiClientFactory extends Object
Factory responsible for creating ApiClient instances for each main Symphony's components :
  • Agent
  • KeyManager
  • Pod
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Deprecated.
    to be removed if we want to move retry to another module
  • Constructor Summary

    Constructors
    Constructor
    Description
    ApiClientFactory(com.symphony.bdk.core.config.model.BdkConfig config)
     
    ApiClientFactory(com.symphony.bdk.core.config.model.BdkConfig config, com.symphony.bdk.http.api.ApiClientBuilderProvider apiClientBuilderProvider)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.symphony.bdk.http.api.ApiClient
    buildAgentClient(String basePath, com.symphony.bdk.core.config.model.BdkAgentConfig agentConfig)
     
    protected com.symphony.bdk.http.api.ApiClient
    buildClient(String contextPath, com.symphony.bdk.core.config.model.BdkClientConfig clientConfig)
     
    protected com.symphony.bdk.http.api.ApiClient
    buildClientWithCertificate(com.symphony.bdk.core.config.model.BdkClientConfig clientConfig, String contextPath, com.symphony.bdk.core.config.model.BdkAuthenticationConfig config)
     
    protected void
    configureProxy(com.symphony.bdk.core.config.model.BdkProxyConfig proxyConfig, com.symphony.bdk.http.api.ApiClientBuilder apiClientBuilder)
     
    protected void
    configureTruststore(com.symphony.bdk.http.api.ApiClientBuilder apiClientBuilder)
     
    com.symphony.bdk.http.api.ApiClient
    Returns a fully initialized ApiClient for Agent API.
    protected com.symphony.bdk.http.api.ApiClientBuilder
    getApiClientBuilder(String basePath, com.symphony.bdk.core.config.model.BdkClientConfig clientConfig)
     
    com.symphony.bdk.http.api.ApiClient
    Returns a fully initialized ApiClient for Agent API to be used by the datafeed services.
    com.symphony.bdk.http.api.ApiClient
    Returns a fully initialized ApiClient for Agent API to be used by the datahose services.
    com.symphony.bdk.http.api.ApiClient
    Returns a fully initialized ApiClient for the SessionAuth API using in Extension App Authentication.
    com.symphony.bdk.http.api.ApiClient
    Returns a fully initialized ApiClient for the KeyAuth API.
    com.symphony.bdk.http.api.ApiClient
    Returns a fully initialized ApiClient for Login API.
    com.symphony.bdk.http.api.ApiClient
    Returns a new pod ApiClient with "/pod" as context path.
    com.symphony.bdk.http.api.ApiClient
    getPodClient(String contextPath)
    Returns a new pod ApiClient for a given context path.
    com.symphony.bdk.http.api.ApiClient
    Returns a fully initialized non-load-balanced ApiClient for Agent API.
    com.symphony.bdk.http.api.ApiClient
    Returns a fully initialized non-load-balanced ApiClient for Agent API given an agent base path.
    com.symphony.bdk.http.api.ApiClient
    Returns a fully initialized ApiClient for KeyManager API.
    Deprecated.
    to be removed if we want to move retry to another module
    com.symphony.bdk.http.api.ApiClient
    Returns a fully initialized ApiClient for the SessionAuth API.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ApiClientFactory

      public ApiClientFactory(@Nonnull com.symphony.bdk.core.config.model.BdkConfig config)
    • ApiClientFactory

      public ApiClientFactory(@Nonnull com.symphony.bdk.core.config.model.BdkConfig config, @Nonnull com.symphony.bdk.http.api.ApiClientBuilderProvider apiClientBuilderProvider)
  • Method Details

    • getLoginClient

      public com.symphony.bdk.http.api.ApiClient getLoginClient()
      Returns a fully initialized ApiClient for Login API.
      Returns:
      a new ApiClient instance.
    • getPodClient

      public com.symphony.bdk.http.api.ApiClient getPodClient()
      Returns a new pod ApiClient with "/pod" as context path.
      Returns:
      a new ApiClient instance.
    • getPodClient

      public com.symphony.bdk.http.api.ApiClient getPodClient(String contextPath)
      Returns a new pod ApiClient for a given context path.
      Parameters:
      contextPath - context path.
      Returns:
      a new ApiClient instance.
      See Also:
    • getRelayClient

      public com.symphony.bdk.http.api.ApiClient getRelayClient()
      Returns a fully initialized ApiClient for KeyManager API.
      Returns:
      a new ApiClient instance.
    • getAgentClient

      public com.symphony.bdk.http.api.ApiClient getAgentClient()
      Returns a fully initialized ApiClient for Agent API. This may be a RegularLoadBalancedApiClient or a non load-balanced ApiClient based on the configuration.
      Returns:
      a new ApiClient instance.
    • getDatafeedAgentClient

      public com.symphony.bdk.http.api.ApiClient getDatafeedAgentClient()
      Returns a fully initialized ApiClient for Agent API to be used by the datafeed services. This may be a DatafeedLoadBalancedApiClient or a non load-balanced ApiClient based on the configuration.
      Returns:
      a new ApiClient instance.
    • getDatahoseAgentClient

      public com.symphony.bdk.http.api.ApiClient getDatahoseAgentClient()
      Returns a fully initialized ApiClient for Agent API to be used by the datahose services.
      Returns:
      a new ApiClient instance.
    • getRegularAgentClient

      public com.symphony.bdk.http.api.ApiClient getRegularAgentClient()
      Returns a fully initialized non-load-balanced ApiClient for Agent API.
      Returns:
      a new ApiClient instance.
    • getRegularAgentClient

      public com.symphony.bdk.http.api.ApiClient getRegularAgentClient(String agentBasePath)
      Returns a fully initialized non-load-balanced ApiClient for Agent API given an agent base path.
      Parameters:
      agentBasePath - the agent base URL to target.
      Returns:
      a new ApiClient instance.
    • getSessionAuthClient

      public com.symphony.bdk.http.api.ApiClient getSessionAuthClient()
      Returns a fully initialized ApiClient for the SessionAuth API. This only works with a certification configured.
      Returns:
      a new ApiClient instance.
    • getExtAppSessionAuthClient

      public com.symphony.bdk.http.api.ApiClient getExtAppSessionAuthClient()
      Returns a fully initialized ApiClient for the SessionAuth API using in Extension App Authentication. This only works with a extension app authentication configured
      Returns:
      a new ApiClient instance.
    • getKeyAuthClient

      public com.symphony.bdk.http.api.ApiClient getKeyAuthClient()
      Returns a fully initialized ApiClient for the KeyAuth API. This only works with a certification configured.
      Returns:
      an new ApiClient instance.
    • buildClient

      protected com.symphony.bdk.http.api.ApiClient buildClient(String contextPath, com.symphony.bdk.core.config.model.BdkClientConfig clientConfig)
    • buildAgentClient

      protected com.symphony.bdk.http.api.ApiClient buildAgentClient(String basePath, com.symphony.bdk.core.config.model.BdkAgentConfig agentConfig)
    • buildClientWithCertificate

      protected com.symphony.bdk.http.api.ApiClient buildClientWithCertificate(com.symphony.bdk.core.config.model.BdkClientConfig clientConfig, String contextPath, com.symphony.bdk.core.config.model.BdkAuthenticationConfig config)
    • getApiClientBuilder

      protected com.symphony.bdk.http.api.ApiClientBuilder getApiClientBuilder(String basePath, com.symphony.bdk.core.config.model.BdkClientConfig clientConfig)
    • configureTruststore

      protected void configureTruststore(com.symphony.bdk.http.api.ApiClientBuilder apiClientBuilder)
    • configureProxy

      protected void configureProxy(com.symphony.bdk.core.config.model.BdkProxyConfig proxyConfig, com.symphony.bdk.http.api.ApiClientBuilder apiClientBuilder)
    • getServiceNameFromBasePath

      @Deprecated public static ApiClientFactory.ServiceEnum getServiceNameFromBasePath(String basePath)
      Deprecated.
      to be removed if we want to move retry to another module