Package com.symphony.bdk.core.extension
Class ExtensionService
java.lang.Object
com.symphony.bdk.core.extension.ExtensionService
Service class for managing extensions.
- See Also:
-
BdkExtension
-
Constructor Summary
ConstructorDescriptionExtensionService
(ApiClientFactory apiClientFactory, AuthSession botSession, RetryWithRecoveryBuilder<?> retryBuilder, com.symphony.bdk.core.config.model.BdkConfig config) -
Method Summary
Modifier and TypeMethodDescriptionvoid
register
(com.symphony.bdk.extension.BdkExtension extension) void
Registers and instantiates an extension.<S extends com.symphony.bdk.extension.BdkExtensionService,
E extends com.symphony.bdk.extension.BdkExtensionServiceProvider<S>>
SRetrieves an extension service instance.
-
Constructor Details
-
ExtensionService
public ExtensionService(@Nonnull ApiClientFactory apiClientFactory, @Nullable AuthSession botSession, @Nonnull RetryWithRecoveryBuilder<?> retryBuilder, @Nonnull com.symphony.bdk.core.config.model.BdkConfig config)
-
-
Method Details
-
register
public void register(com.symphony.bdk.extension.BdkExtension extension) -
register
Registers and instantiates an extension.- Parameters:
extClz
- Type of the extension.- Throws:
IllegalStateException
- if the extension has already been registeredBdkExtensionException
- if the extension cannot be instantiated- See Also:
-
BdkExtension
-
service
public <S extends com.symphony.bdk.extension.BdkExtensionService,E extends com.symphony.bdk.extension.BdkExtensionServiceProvider<S>> S service(Class<E> extClz) Retrieves an extension service instance.- Type Parameters:
S
- Type of the extension service.E
- Type of the extension.- Parameters:
extClz
- The extension class.- Returns:
- extension service instance.
- Throws:
IllegalStateException
- if the extension is not registered- See Also:
-
BdkExtension
BdkExtensionServiceProvider
register(Class)
-