Package com.symphony.bdk.core.client
Class ApiClientFactory
java.lang.Object
com.symphony.bdk.core.client.ApiClientFactory
- Direct Known Subclasses:
EnhancedAuthApiClientFactory
Factory responsible for creating
ApiClient
instances for each main Symphony's components
:
- Agent
- KeyManager
- Pod
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Deprecated.to be removed if we want to move retry to another module -
Constructor Summary
ConstructorDescriptionApiClientFactory
(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 TypeMethodDescriptionprotected 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 initializedApiClient
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 initializedApiClient
for Agent API to be used by the datafeed services.com.symphony.bdk.http.api.ApiClient
Returns a fully initializedApiClient
for Agent API to be used by the datahose services.com.symphony.bdk.http.api.ApiClient
Returns a fully initializedApiClient
for the SessionAuth API using in Extension App Authentication.com.symphony.bdk.http.api.ApiClient
Returns a fully initializedApiClient
for the KeyAuth API.com.symphony.bdk.http.api.ApiClient
Returns a fully initializedApiClient
for Login API.com.symphony.bdk.http.api.ApiClient
Returns a new podApiClient
with "/pod" as context path.com.symphony.bdk.http.api.ApiClient
getPodClient
(String contextPath) Returns a new podApiClient
for a given context path.com.symphony.bdk.http.api.ApiClient
Returns a fully initialized non-load-balancedApiClient
for Agent API.com.symphony.bdk.http.api.ApiClient
getRegularAgentClient
(String agentBasePath) Returns a fully initialized non-load-balancedApiClient
for Agent API given an agent base path.com.symphony.bdk.http.api.ApiClient
Returns a fully initializedApiClient
for KeyManager API.static ApiClientFactory.ServiceEnum
getServiceNameFromBasePath
(String basePath) Deprecated.to be removed if we want to move retry to another modulecom.symphony.bdk.http.api.ApiClient
Returns a fully initializedApiClient
for the SessionAuth API.
-
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 initializedApiClient
for Login API.- Returns:
- a new
ApiClient
instance.
-
getPodClient
public com.symphony.bdk.http.api.ApiClient getPodClient()Returns a new podApiClient
with "/pod" as context path.- Returns:
- a new
ApiClient
instance.
-
getPodClient
Returns a new podApiClient
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 initializedApiClient
for KeyManager API.- Returns:
- a new
ApiClient
instance.
-
getAgentClient
public com.symphony.bdk.http.api.ApiClient getAgentClient()Returns a fully initializedApiClient
for Agent API. This may be aRegularLoadBalancedApiClient
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 initializedApiClient
for Agent API to be used by the datafeed services. This may be aDatafeedLoadBalancedApiClient
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 initializedApiClient
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-balancedApiClient
for Agent API.- Returns:
- a new
ApiClient
instance.
-
getRegularAgentClient
Returns a fully initialized non-load-balancedApiClient
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 initializedApiClient
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 initializedApiClient
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 initializedApiClient
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.to be removed if we want to move retry to another module
-