BotDependencyConfiguration 類別
- java.
lang. Object - com.
microsoft. bot. integration. spring. BotDependencyConfiguration
- com.
public abstract class BotDependencyConfiguration
這會為 Bot 應用程式提供預設的相依性建立。
這個類別應該由具有 org.springframework.context.annotation.Configuration 註釋的類別子類別化(或 SpringBootApplication 註釋)。
Bot 應該以 @Component加上批注,可能包括 @AutoWired 來指出要使用的建構函式。
建構函式摘要
| 建構函式 | Description | |
|---|---|---|
| BotDependencyConfiguration() | ||
方法摘要
| 修飾詞與類型 | 方法與描述 |
|---|---|
|
Authentication |
getAuthenticationConfiguration(Configuration configuration)
傳回應用程式的驗證 |
|
Bot |
getBotFrameworkHttpAdaptor(Configuration configuration)
傳回應用程式的 Bot |
|
Channel |
getChannelProvider(Configuration configuration)
傳回應用程式的通道 |
| Configuration |
getConfiguration()
傳回應用程式的組態。 |
|
Conversation |
getConversationState(Storage storage)
會傳回 Conversation |
|
Credential |
getCredentialProvider(Configuration configuration)
傳回應用程式的認證 |
| java.util.concurrent.ExecutorService |
getExecutorService()
傳回執行程式 |
|
Inspection |
getInspectionState(Storage storage)
建立 com.microsoft.bot.builder.inspection.InspectionMiddleware所使用的檢查 |
| Storage |
getStorage()
傳回 Storage 物件。 |
|
User |
getUserState(Storage storage)
會傳回 User |
方法繼承來源 java.lang.Object
建構函式詳細資料
BotDependencyConfiguration
public BotDependencyConfiguration()
方法詳細資料
getAuthenticationConfiguration
public AuthenticationConfiguration getAuthenticationConfiguration(Configuration configuration)
傳回應用程式的 AuthenticationConfiguration。 根據預設,它會使用 AuthenticationConfiguration 類別。 Singleton 的預設範圍。
參數:
傳回:
getBotFrameworkHttpAdaptor
public BotFrameworkHttpAdapter getBotFrameworkHttpAdaptor(Configuration configuration)
傳回應用程式的 BotFrameworkHttpAdapter。 根據預設,它會使用 BotFrameworkHttpAdapter 類別。 Singleton 的預設範圍。
參數:
傳回:
getChannelProvider
public ChannelProvider getChannelProvider(Configuration configuration)
傳回應用程式的 ChannelProvider。 根據預設,它會使用 ConfigurationChannelProvider 類別。 Singleton 的預設範圍。
參數:
傳回:
getConfiguration
public Configuration getConfiguration()
傳回應用程式的組態。 根據預設,它會使用 ClasspathPropertiesConfiguration 類別。 Singleton 的預設範圍。
傳回:
getConversationState
public ConversationState getConversationState(Storage storage)
會傳回 ConversationState 物件。 Singleton 的預設範圍。
參數:
傳回:
getCredentialProvider
public CredentialProvider getCredentialProvider(Configuration configuration)
傳回應用程式的 CredentialProvider。 根據預設,它會使用 ConfigurationCredentialProvider 類別。 Singleton 的預設範圍。
參數:
傳回:
getExecutorService
public ExecutorService getExecutorService()
會傳回 ExecutorService。
現在,傳回 Bot-connector ExecutorService。 這是考慮的領域。 這裏的目標是要有一個常見的ExecutorService,以避免多個線程集區。
傳回:
getInspectionState
public InspectionState getInspectionState(Storage storage)
建立 com.microsoft.bot.builder.inspection.InspectionMiddleware所使用的檢查State。 Singleton 的預設範圍。
參數:
傳回:
getStorage
getUserState
public UserState getUserState(Storage storage)
會傳回UserState物件。 Singleton 的預設範圍。
參數:
傳回: