ActivityPrompt クラス
- java.
lang. Object - com.
microsoft. bot. dialogs. Dialog - com.
microsoft. bot. dialogs. prompts. ActivityPrompt
- com.
- com.
public class ActivityPrompt
extends Dialog
アクティビティの受信を待機するプロンプト ダイアログの主要な動作を定義します。 このプロンプトは検証コントロールを渡す必要があり、イベントなどのメッセージ以外のアクティビティが受信されるのを待つ場合に便利です。検証コントロールは、期待されるアクティビティの種類が受信されるまで、受信したアクティビティを無視できます。
コンストラクターの概要
| コンストラクター | 説明 |
|---|---|
| ActivityPrompt(String dialogId, PromptValidator<Activity> validator) |
ActivityPrompt クラスの新しいインスタンスを初期化します。 |
メソッドの概要
| 修飾子と型 | メソッドと説明 |
|---|---|
|
java.util.concurrent.CompletableFuture<Dialog |
beginDialog(DialogContext dc, Object options)
プロンプト ダイアログがダイアログ スタックにプッシュされ、アクティブ化されるときに呼び出されます。 |
|
java.util.concurrent.CompletableFuture<Dialog |
continueDialog(DialogContext dc)
プロンプト ダイアログがアクティブなダイアログであり、ユーザーが新しいアクティビティで応答したときに呼び出されます。 |
| protected java.util.concurrent.CompletableFuture<java.lang.Void> |
onPrompt(TurnContext turnContext, Map<String,Object> state, PromptOptions options)
派生クラスでオーバーライドされると、ユーザーに入力を求めます。 |
| protected java.util.concurrent.CompletableFuture<java.lang.Void> |
onPrompt(TurnContext turnContext, Map<String,Object> state, PromptOptions options, Boolean isRetry)
派生クラスでオーバーライドされると、ユーザーに入力を求めます。 |
|
protected
java.util.concurrent.CompletableFuture<Prompt |
onRecognize(TurnContext turnContext, Map<String,Object> state, PromptOptions options)
派生クラスでオーバーライドされると、受信アクティビティを認識しようとします。 |
| java.util.concurrent.CompletableFuture<java.lang.Void> |
repromptDialog(TurnContext turnContext, DialogInstance instance)
ユーザーに入力を再度求めるプロンプト ダイアログが要求されたときに呼び出されます。 |
|
java.util.concurrent.CompletableFuture<Dialog |
resumeDialog(DialogContext dc, DialogReason reason, Object result)
以前のアクティブなダイアログが完了したときなど、ダイアログ スタック上のアクティブなダイアログとしてプロンプト ダイアログが再開されたときに呼び出されます。 |
メソッドの継承元: Dialog
メソッドの継承元: java.lang.Object
コンストラクターの詳細
ActivityPrompt
public ActivityPrompt(String dialogId, PromptValidator
ActivityPrompt クラスの新しいインスタンスを初期化します。 ActivityPrompt クラスを初期化するために、派生クラスのコンストラクターから呼び出されます。
パラメーター:
The value of dialogId must be unique within the
<xref uid="com.microsoft.bot.dialogs.DialogSet" data-throw-if-not-resolved="false" data-raw-source="DialogSet"></xref> or <xref uid="com.microsoft.bot.dialogs.ComponentDialog" data-throw-if-not-resolved="false" data-raw-source="ComponentDialog"></xref> to which the
prompt is added.
メソッドの詳細
beginDialog
public CompletableFuture
プロンプト ダイアログがダイアログ スタックにプッシュされ、アクティブ化されるときに呼び出されます。
上書き:
ActivityPrompt.beginDialog(DialogContext dc, Object options)パラメーター:
戻り値:
If the task is successful, the result indicates whether the prompt is
still active after the turn has been processed by the prompt.
continueDialog
public CompletableFuture
プロンプト ダイアログがアクティブなダイアログであり、ユーザーが新しいアクティビティで応答したときに呼び出されます。
上書き:
ActivityPrompt.continueDialog(DialogContext dc)パラメーター:
戻り値:
If the task is successful, the result indicates whether the dialog is
still active after the turn has been processed by the dialog. The
prompt generally continues to receive the user's replies until it
accepts the user's reply as valid input for the prompt.
onPrompt
protected CompletableFuture
派生クラスでオーバーライドされると、ユーザーに入力を求めます。
パラメーター:
戻り値:
onPrompt
protected CompletableFuture
派生クラスでオーバーライドされると、ユーザーに入力を求めます。
パラメーター:
戻り値:
onRecognize
protected CompletableFuture
派生クラスでオーバーライドされると、受信アクティビティを認識しようとします。
パラメーター:
戻り値:
If the task is successful, the result describes the result of the
recognition attempt.
repromptDialog
public CompletableFuture
ユーザーに入力を再度求めるプロンプト ダイアログが要求されたときに呼び出されます。
上書き:
ActivityPrompt.repromptDialog(TurnContext turnContext, DialogInstance instance)パラメーター:
戻り値:
resumeDialog
public CompletableFuture
以前のアクティブなダイアログが完了したときなど、ダイアログ スタック上のアクティブなダイアログとしてプロンプト ダイアログが再開されたときに呼び出されます。
上書き:
ActivityPrompt.resumeDialog(DialogContext dc, DialogReason reason, Object result)パラメーター:
戻り値:
If the task is successful, the result indicates whether the dialog is
still active after the turn has been processed by the dialog.