@API(status=EXPERIMENTAL)
public class ExtensionService
extends java.lang.Object
BdkExtension
Constructor and Description |
---|
ExtensionService(ApiClientFactory apiClientFactory,
AuthSession botSession,
RetryWithRecoveryBuilder<?> retryBuilder,
com.symphony.bdk.core.config.model.BdkConfig config) |
Modifier and Type | Method and Description |
---|---|
void |
register(com.symphony.bdk.extension.BdkExtension extension) |
void |
register(java.lang.Class<? extends com.symphony.bdk.extension.BdkExtension> extClz)
Registers and instantiates an extension.
|
<S extends com.symphony.bdk.extension.BdkExtensionService,E extends com.symphony.bdk.extension.BdkExtensionServiceProvider<S>> |
service(java.lang.Class<E> extClz)
Retrieves an extension service instance.
|
public ExtensionService(@Nonnull ApiClientFactory apiClientFactory, @Nullable AuthSession botSession, @Nonnull RetryWithRecoveryBuilder<?> retryBuilder, @Nonnull com.symphony.bdk.core.config.model.BdkConfig config)
public void register(com.symphony.bdk.extension.BdkExtension extension)
public void register(java.lang.Class<? extends com.symphony.bdk.extension.BdkExtension> extClz)
extClz
- Type of the extension.java.lang.IllegalStateException
- if the extension has already been registeredBdkExtensionException
- if the extension cannot be instantiatedBdkExtension
public <S extends com.symphony.bdk.extension.BdkExtensionService,E extends com.symphony.bdk.extension.BdkExtensionServiceProvider<S>> S service(java.lang.Class<E> extClz)
S
- Type of the extension service.E
- Type of the extension.extClz
- The extension class.java.lang.IllegalStateException
- if the extension is not registeredBdkExtension
,
BdkExtensionServiceProvider
,
register(Class)