BotDependencyConfiguration 類別

  • java.lang.Object
    • com.microsoft.bot.integration.spring.BotDependencyConfiguration

public abstract class BotDependencyConfiguration

這會為 Bot 應用程式提供預設的相依性建立。

這個類別應該由具有 org.springframework.context.annotation.Configuration 註釋的類別子類別化(或 SpringBootApplication 註釋)。

Bot 應該以 @Component加上批注,可能包括 @AutoWired 來指出要使用的建構函式。

建構函式摘要

建構函式 Description
BotDependencyConfiguration()

方法摘要

修飾詞與類型 方法與描述
AuthenticationConfiguration getAuthenticationConfiguration(Configuration configuration)

傳回應用程式的驗證組態。

BotFrameworkHttpAdapter getBotFrameworkHttpAdaptor(Configuration configuration)

傳回應用程式的 BotFrameworkHttp配接器。

ChannelProvider getChannelProvider(Configuration configuration)

傳回應用程式的通道提供者。

Configuration getConfiguration()

傳回應用程式的組態。

ConversationState getConversationState(Storage storage)

會傳回 ConversationState 物件。

CredentialProvider getCredentialProvider(Configuration configuration)

傳回應用程式的認證提供者。

java.util.concurrent.ExecutorService getExecutorService()

傳回執行程式服務。

InspectionState getInspectionState(Storage storage)

建立 com.microsoft.bot.builder.inspection.InspectionMiddleware所使用的檢查狀態。

Storage getStorage()

傳回 Storage 物件。

UserState getUserState(Storage storage)

會傳回 UserState 物件。

方法繼承來源 java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

建構函式詳細資料

BotDependencyConfiguration

public BotDependencyConfiguration()

方法詳細資料

getAuthenticationConfiguration

public AuthenticationConfiguration getAuthenticationConfiguration(Configuration configuration)

傳回應用程式的 AuthenticationConfiguration。 根據預設,它會使用 AuthenticationConfiguration 類別。 Singleton 的預設範圍。

參數:

configuration - 要讀取的 Configuration 物件。

傳回:

AuthenticationConfiguration 物件。

getBotFrameworkHttpAdaptor

public BotFrameworkHttpAdapter getBotFrameworkHttpAdaptor(Configuration configuration)

傳回應用程式的 BotFrameworkHttpAdapter。 根據預設,它會使用 BotFrameworkHttpAdapter 類別。 Singleton 的預設範圍。

參數:

configuration - 要讀取的 Configuration 物件。

傳回:

BotFrameworkHttpAdapter 物件。

getChannelProvider

public ChannelProvider getChannelProvider(Configuration configuration)

傳回應用程式的 ChannelProvider。 根據預設,它會使用 ConfigurationChannelProvider 類別。 Singleton 的預設範圍。

參數:

configuration - 要讀取的 Configuration 物件。

傳回:

ChannelProvider 物件。

getConfiguration

public Configuration getConfiguration()

傳回應用程式的組態。 根據預設,它會使用 ClasspathPropertiesConfiguration 類別。 Singleton 的預設範圍。

傳回:

Configuration 物件。

getConversationState

public ConversationState getConversationState(Storage storage)

會傳回 ConversationState 物件。 Singleton 的預設範圍。

參數:

storage - 要使用的 Storage 物件。

傳回:

ConversationState 物件。

getCredentialProvider

public CredentialProvider getCredentialProvider(Configuration configuration)

傳回應用程式的 CredentialProvider。 根據預設,它會使用 ConfigurationCredentialProvider 類別。 Singleton 的預設範圍。

參數:

configuration - 要讀取的 Configuration 物件。

傳回:

CredentialProvider 物件。

getExecutorService

public ExecutorService getExecutorService()

會傳回 ExecutorService。

現在,傳回 Bot-connector ExecutorService。 這是考慮的領域。 這裏的目標是要有一個常見的ExecutorService,以避免多個線程集區。

傳回:

ExecutorService。

getInspectionState

public InspectionState getInspectionState(Storage storage)

建立 com.microsoft.bot.builder.inspection.InspectionMiddleware所使用的檢查State。 Singleton 的預設範圍。

參數:

storage - 要使用的記憶體。 getStorage()

傳回:

使用指定記憶體的 InspectionState 物件。

getStorage

public Storage getStorage()

傳回 Storage 物件。 Singleton 的預設範圍。

傳回:

Storage 物件。

getUserState

public UserState getUserState(Storage storage)

會傳回UserState物件。 Singleton 的預設範圍。

參數:

storage - 要使用的 Storage 物件。

傳回:

UserState 物件。

適用於