BotDependencyConfiguration Class
- java.
lang. Object - com.
microsoft. bot. integration. spring. BotDependencyConfiguration
- com.
public abstract class BotDependencyConfiguration
This provides the default dependency creation for a Bot application.
This class should be subclassed by a class with the org.springframework.context.annotation.Configuration annotation (or SpringBootApplication annotation).
The Bot should be annotated with @Component, possibly including @AutoWired to indicate which constructor to use.
Constructor Summary
| Constructor | Description | |
|---|---|---|
| BotDependencyConfiguration() | ||
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Authentication |
getAuthenticationConfiguration(Configuration configuration)
Returns the Authentication |
|
Bot |
getBotFrameworkHttpAdaptor(Configuration configuration)
Returns the Bot |
|
Channel |
getChannelProvider(Configuration configuration)
Returns the Channel |
| Configuration |
getConfiguration()
Returns the Configuration for the application. |
|
Conversation |
getConversationState(Storage storage)
Returns a Conversation |
|
Credential |
getCredentialProvider(Configuration configuration)
Returns the Credential |
| java.util.concurrent.ExecutorService |
getExecutorService()
Returns an Executor |
|
Inspection |
getInspectionState(Storage storage)
Creates an Inspection |
| Storage |
getStorage()
Returns a Storage object. |
|
User |
getUserState(Storage storage)
Returns a User |
Methods inherited from java.lang.Object
Constructor Details
BotDependencyConfiguration
public BotDependencyConfiguration()
Method Details
getAuthenticationConfiguration
public AuthenticationConfiguration getAuthenticationConfiguration(Configuration configuration)
Returns the AuthenticationConfiguration for the application. By default, it uses the AuthenticationConfiguration class. Default scope of Singleton.
Parameters:
Returns:
getBotFrameworkHttpAdaptor
public BotFrameworkHttpAdapter getBotFrameworkHttpAdaptor(Configuration configuration)
Returns the BotFrameworkHttpAdapter for the application. By default, it uses the BotFrameworkHttpAdapter class. Default scope of Singleton.
Parameters:
Returns:
getChannelProvider
public ChannelProvider getChannelProvider(Configuration configuration)
Returns the ChannelProvider for the application. By default, it uses the ConfigurationChannelProvider class. Default scope of Singleton.
Parameters:
Returns:
getConfiguration
public Configuration getConfiguration()
Returns the Configuration for the application. By default, it uses the ClasspathPropertiesConfiguration class. Default scope of Singleton.
Returns:
getConversationState
public ConversationState getConversationState(Storage storage)
Returns a ConversationState object. Default scope of Singleton.
Parameters:
Returns:
getCredentialProvider
public CredentialProvider getCredentialProvider(Configuration configuration)
Returns the CredentialProvider for the application. By default, it uses the ConfigurationCredentialProvider class. Default scope of Singleton.
Parameters:
Returns:
getExecutorService
public ExecutorService getExecutorService()
Returns an ExecutorService.
For now, return the bot-connector ExecutorService. This is an area of consideration. The goal here is to have a common ExecutorService to avoid multiple thread pools.
Returns:
getInspectionState
public InspectionState getInspectionState(Storage storage)
Creates an InspectionState used by com.microsoft.bot.builder.inspection.InspectionMiddleware. Default scope of Singleton.
Parameters:
Returns:
getStorage
public Storage getStorage()
Returns a Storage object. Default scope of Singleton.
Returns:
getUserState
public UserState getUserState(Storage storage)
Returns a UserState object. Default scope of Singleton.
Parameters:
Returns: