ComponentDialog 클래스

public class ComponentDialog
extends DialogContainer

다른 대화 상자로 구성된 Dialog. 구성 요소 대화 상자에는 부모 대화 상자에서 숨겨진 내부 대화 스택을 제공하는 내부 DialogSetDialogContext 있습니다.

필드 요약

한정자 및 형식 필드 및 설명
static final java.lang.String PERSISTEDDIALOGSTATE

지속형 대화 상태의 ID입니다.

생성자 요약

생성자 Description
ComponentDialog(String dialogId)

ComponentDialog 클래스의 새 인스턴스를 초기화합니다.

메서드 요약

한정자 및 형식 메서드 및 설명
ComponentDialog addDialog(Dialog dialog)

구성 요소 대화 상자에 새 Dialog 추가하고 업데이트된 구성 요소를 반환합니다.

java.util.concurrent.CompletableFuture<DialogTurnResult> beginDialog(DialogContext outerDc, Object options)

대화 상자가 시작되고 부모의 대화 상자 스택으로 푸시될 때 호출됩니다.

java.util.concurrent.CompletableFuture<DialogTurnResult> continueDialog(DialogContext outerDc)

대화 상자가 _continued_이면 호출됩니다. 여기서 대화는 활성 대화이고 사용자는 새 활동으로 회신합니다.

DialogContext createChildContext(DialogContext dc)

내부 DialogContext 만듭니다.

protected java.util.concurrent.CompletableFuture<DialogTurnResult> endComponent(DialogContext outerDc, Object result)

구성 요소 대화 상자를 부모 컨텍스트에서 종료합니다.

java.util.concurrent.CompletableFuture<java.lang.Void> endDialog(TurnContext turnContext, DialogInstance instance, DialogReason reason)

대화 상자가 끝날 때 호출됩니다.

protected java.util.concurrent.CompletableFuture<java.lang.Void> ensureInitialized(DialogContext outerDc)

대화 상자가 초기화되었는지 확인합니다.

java.lang.String getInitialDialogId()

초기 대화 상자에 할당된 ID를 가져옵니다.

protected java.util.concurrent.CompletableFuture<DialogTurnResult> onBeginDialog(DialogContext innerDc, Object options)

대화 상자가 시작되고 부모의 대화 상자 스택으로 푸시될 때 호출됩니다.

protected java.util.concurrent.CompletableFuture<DialogTurnResult> onContinueDialog(DialogContext innerDc)

대화 상자가 _continued_이면 호출됩니다. 여기서 대화는 활성 대화이고 사용자는 새 활동으로 회신합니다.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onEndDialog(TurnContext context, DialogInstance instance, DialogReason reason)

대화 상자가 끝날 때 호출됩니다.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onInitialize(DialogContext dc)

대화 상자를 초기화합니다.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onRepromptDialog(TurnContext turnContext, DialogInstance instance)

대화 상자가 사용자에게 입력하라는 메시지를 다시 표시해야 할 때 호출됩니다.

java.util.concurrent.CompletableFuture<java.lang.Void> repromptDialog(TurnContext turnContext, DialogInstance instance)

대화 상자가 사용자에게 입력하라는 메시지를 다시 표시해야 할 때 호출됩니다.

java.util.concurrent.CompletableFuture<DialogTurnResult> resumeDialog(DialogContext outerDc, DialogReason reason, Object result)

부모 대화 스택의 자식 대화 상자가 이 순서를 완료하고 컨트롤을 이 대화 상자 구성 요소로 반환할 때 호출됩니다.

void setInitialDialogId(String withInitialDialogId)

초기 대화 상자에 할당된 ID를 설정합니다.

다음에서 상속된 메서드 Dialog

다음에서 상속된 메서드 DialogContainer

다음에서 상속된 메서드 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

필드 세부 정보

PERSISTEDDIALOGSTATE

public static final String PERSISTEDDIALOGSTATE

지속형 대화 상태의 ID입니다.

생성자 세부 정보

ComponentDialog

public ComponentDialog(String dialogId)

ComponentDialog 클래스의 새 인스턴스를 초기화합니다.

매개 변수:

dialogId - 부모 대화 집합 내의 새 대화 상자에 할당할 D입니다.

메서드 세부 정보

addDialog

public ComponentDialog addDialog(Dialog dialog)

구성 요소 대화 상자에 새 Dialog 추가하고 업데이트된 구성 요소를 반환합니다.

매개 변수:

dialog - 추가할 대화 상자입니다.

반환:

작업이 완료된 후 ComponentDialog.
     The added dialog's <xref uid="com.microsoft.bot.dialogs.Dialog.telemetryClient" data-throw-if-not-resolved="false" data-raw-source="Dialog#telemetryClient"></xref> is set to the
     <xref uid="com.microsoft.bot.dialogs.DialogContainer.telemetryClient" data-throw-if-not-resolved="false" data-raw-source="DialogContainer#telemetryClient"></xref> of the component dialog.

beginDialog

public CompletableFuture beginDialog(DialogContext outerDc, Object options)

대화 상자가 시작되고 부모의 대화 상자 스택으로 푸시될 때 호출됩니다.

재정의:

ComponentDialog.beginDialog(DialogContext outerDc, Object options)

매개 변수:

outerDc - 현재 대화 전환에 대한 부모 DialogContext.
options - 대화 상자에 전달할 선택적 초기 정보입니다.

반환:

동기 연산을 나타내는 CompletableFuture.
     If the task is successful, the result indicates whether the dialog is
     still active after the turn has been processed by the dialog.

continueDialog

public CompletableFuture continueDialog(DialogContext outerDc)

대화 상자가 _continued_이면 호출됩니다. 여기서 대화는 활성 대화이고 사용자는 새 활동으로 회신합니다.

재정의:

ComponentDialog.continueDialog(DialogContext outerDc)

매개 변수:

outerDc - 현재 대화 전환에 대한 부모 DialogContext.

반환:

동기 연산을 나타내는 CompletableFuture.
     If the task is successful, the result indicates whether the dialog is
     still active after the turn has been processed by the dialog. The
     result may also contain a return value. If this method is *not*
     overridden, the component dialog calls the
     <xref uid="com.microsoft.bot.dialogs.DialogContext.continueDialog*" data-throw-if-not-resolved="false" data-raw-source="DialogContext#continueDialog(CancellationToken)"></xref> method on its
     inner dialog context. If the inner dialog stack is empty, the
     component dialog ends, and if a <xref uid="com.microsoft.bot.dialogs.DialogTurnResult.result" data-throw-if-not-resolved="false" data-raw-source="DialogTurnResult#result"></xref> is
     available, the component dialog uses that as its return value.

createChildContext

public DialogContext createChildContext(DialogContext dc)

내부 DialogContext 만듭니다.

재정의:

ComponentDialog.createChildContext(DialogContext dc)

매개 변수:

dc - 부모 DialogContext.

반환:

만든 대화 상자 컨텍스트입니다.

endComponent

protected CompletableFuture endComponent(DialogContext outerDc, Object result)

구성 요소 대화 상자를 부모 컨텍스트에서 종료합니다.

매개 변수:

outerDc - 현재 대화 전환에 대한 부모 DialogContext.
result - 선택 사항으로, 대화 상자 구성 요소에서 부모 컨텍스트로 반환할 값입니다.

반환:

실행할 큐에 대기 중인 작업을 나타내는 작업입니다.
     If the task is successful, the result indicates that the dialog ended
     after the turn was processed by the dialog. In general, the parent
     context is the dialog or bot turn handler that started the dialog. If
     the parent is a dialog, the stack calls the parent's
     <xref uid="com.microsoft.bot.dialogs.Dialog.resumeDialog(com.microsoft.bot.dialogs.DialogContext,com.microsoft.bot.dialogs.DialogReason,java.lang.Object)" data-throw-if-not-resolved="false" data-raw-source="Dialog#resumeDialog(DialogContext, DialogReason, Object)"></xref>
     method to return a result to the parent dialog. If the parent dialog
     does not implement `ResumeDialog`, then the parent will end, too, and
     the result is passed to the next parent context, if one exists. The
     returned <xref uid="com.microsoft.bot.dialogs.DialogTurnResult" data-throw-if-not-resolved="false" data-raw-source="DialogTurnResult"></xref> contains the return value in its
     <xref uid="com.microsoft.bot.dialogs.DialogTurnResult.result" data-throw-if-not-resolved="false" data-raw-source="DialogTurnResult#result"></xref> property.

endDialog

public CompletableFuture endDialog(TurnContext turnContext, DialogInstance instance, DialogReason reason)

대화 상자가 끝날 때 호출됩니다.

재정의:

ComponentDialog.endDialog(TurnContext turnContext, DialogInstance instance, DialogReason reason)

매개 변수:

turnContext - 이 턴에 대한 컨텍스트 개체입니다.
instance - 부모 대화 상자 스택에서 이 구성 요소 대화 상자의 인스턴스와 연결된 상태 정보입니다.
reason - 대화 상자가 종료된 이유입니다.

반환:

동기 연산을 나타내는 CompletableFuture.
     When this method is called from the parent dialog's context, the
     component dialog cancels all of the dialogs on its inner dialog stack
     before ending.

ensureInitialized

protected CompletableFuture ensureInitialized(DialogContext outerDc)

대화 상자가 초기화되었는지 확인합니다.

매개 변수:

outerDc - 바깥 DialogContext.

반환:

동기 연산을 나타내는 CompletableFuture.

getInitialDialogId

public String getInitialDialogId()

초기 대화 상자에 할당된 ID를 가져옵니다.

반환:

String인 InitialDialogId 값입니다.

onBeginDialog

protected CompletableFuture onBeginDialog(DialogContext innerDc, Object options)

대화 상자가 시작되고 부모의 대화 상자 스택으로 푸시될 때 호출됩니다.

매개 변수:

innerDc - 현재 대화 전환에 대한 내부 DialogContext.
options - 대화 상자에 전달할 선택적 초기 정보입니다.

반환:

동기 연산을 나타내는 CompletableFuture.
     If the task is successful, the result indicates whether the dialog is
     still active after the turn has been processed by the dialog. By
     default, this calls the
     <xref uid="com.microsoft.bot.dialogs.Dialog.beginDialog(com.microsoft.bot.dialogs.DialogContext,java.lang.Object)" data-throw-if-not-resolved="false" data-raw-source="Dialog#beginDialog(DialogContext, Object)"></xref> method of the
     component dialog's initial dialog, as defined by
     InitialDialogId . Override this method in a derived class to
     implement interrupt logic.

onContinueDialog

protected CompletableFuture onContinueDialog(DialogContext innerDc)

대화 상자가 _continued_이면 호출됩니다. 여기서 대화는 활성 대화이고 사용자는 새 활동으로 회신합니다.

매개 변수:

innerDc - 현재 대화 전환에 대한 내부 DialogContext.

반환:

동기 연산을 나타내는 CompletableFuture.
     If the task is successful, the result indicates whether the dialog is
     still active after the turn has been processed by the dialog. The
     result may also contain a return value. By default, this calls the
     currently active inner dialog's
     <xref uid="com.microsoft.bot.dialogs.Dialog.continueDialog(com.microsoft.bot.dialogs.DialogContext)" data-throw-if-not-resolved="false" data-raw-source="Dialog#continueDialog(DialogContext)"></xref> method. Override this
     method in a derived class to implement interrupt logic.

onEndDialog

protected CompletableFuture onEndDialog(TurnContext context, DialogInstance instance, DialogReason reason)

대화 상자가 끝날 때 호출됩니다.

매개 변수:

context - 이 턴에 대한 컨텍스트 개체입니다.
instance - 이 구성 요소 대화 상자의 내부 대화 스택과 연결된 상태 정보입니다.
reason - 대화 상자가 종료된 이유입니다.

반환:

동기 연산을 나타내는 CompletableFuture.
     Override this method in a derived class to implement any additional
     logic that should happen at the component level, after all inner
     dialogs have been canceled.

onInitialize

protected CompletableFuture onInitialize(DialogContext dc)

대화 상자를 초기화합니다.

매개 변수:

dc - 초기화할 DialogContext.

반환:

동기 연산을 나타내는 CompletableFuture.

onRepromptDialog

protected CompletableFuture onRepromptDialog(TurnContext turnContext, DialogInstance instance)

대화 상자가 사용자에게 입력하라는 메시지를 다시 표시해야 할 때 호출됩니다.

매개 변수:

turnContext - 이 턴에 대한 컨텍스트 개체입니다.
instance - 이 구성 요소 대화 상자의 내부 대화 스택과 연결된 상태 정보입니다.

반환:

동기 연산을 나타내는 CompletableFuture.
     Override this method in a derived class to implement any additional
     logic that should happen at the component level, after the re-prompt
     operation completes for the inner dialog.

repromptDialog

public CompletableFuture repromptDialog(TurnContext turnContext, DialogInstance instance)

대화 상자가 사용자에게 입력하라는 메시지를 다시 표시해야 할 때 호출됩니다.

재정의:

ComponentDialog.repromptDialog(TurnContext turnContext, DialogInstance instance)

매개 변수:

turnContext - 이 턴에 대한 컨텍스트 개체입니다.
instance - 이 대화 상자의 상태 정보입니다.

반환:

동기 연산을 나타내는 CompletableFuture.

resumeDialog

public CompletableFuture resumeDialog(DialogContext outerDc, DialogReason reason, Object result)

부모 대화 스택의 자식 대화 상자가 이 순서를 완료하고 컨트롤을 이 대화 상자 구성 요소로 반환할 때 호출됩니다.

재정의:

ComponentDialog.resumeDialog(DialogContext outerDc, DialogReason reason, Object result)

매개 변수:

outerDc - 현재 대화 전환에 대한 DialogContext.
reason - 대화 상자가 다시 시작된 이유입니다.
result - 선택 사항으로, 호출된 대화 상자에서 반환된 값입니다. 반환되는 값의 형식은 자식 대화 상자에 따라 달라집니다.

반환:

동기 연산을 나타내는 CompletableFuture.
     If the task is successful, the result indicates whether this dialog
     is still active after this dialog turn has been processed. Generally,
     the child dialog was started with a call to
     BeginDialog(DialogContext, Object) in the parent's context.
     However, if the <xref uid="com.microsoft.bot.dialogs.DialogContext.replaceDialog(java.lang.String,java.lang.Object)" data-throw-if-not-resolved="false" data-raw-source="DialogContext#replaceDialog(String, Object)"></xref>
     method is called, the logical child dialog may be different than the
     original. If this method is *not* overridden, the dialog
     automatically calls its RepromptDialog(TurnContext,
     DialogInstance) when the user replies.

setInitialDialogId

public void setInitialDialogId(String withInitialDialogId)

초기 대화 상자에 할당된 ID를 설정합니다.

매개 변수:

withInitialDialogId - InitialDialogId 값입니다.

적용 대상