ActivityPrompt 클래스
- java.
lang. Object - com.
microsoft. bot. dialogs. Dialog - com.
microsoft. bot. dialogs. prompts. ActivityPrompt
- com.
- com.
public class ActivityPrompt
extends Dialog
활동이 수신될 때까지 대기하는 프롬프트 대화 상자의 핵심 동작을 정의합니다. 이 프롬프트는 유효성 검사기를 전달해야 하며 이벤트와 같은 비 메시지 활동을 수신할 때까지 대기할 때 유용합니다. 유효성 검사기는 예상된 활동 형식이 수신될 때까지 수신된 활동을 무시할 수 있습니다.
생성자 요약
생성자 | Description |
---|---|
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.