ComponentDialog 클래스
- java.
lang. Object - com.
microsoft. bot. dialogs. Dialog - com.
microsoft. bot. dialogs. DialogContainer - com.
microsoft. bot. dialogs. ComponentDialog
- com.
- com.
- com.
public class ComponentDialog
extends DialogContainer
다른 대화 상자로 구성된 Dialog. 구성 요소 대화 상자에는 부모 대화 상자에서 숨겨진 내부 대화 스택을 제공하는 내부 DialogSet 및 DialogContext 있습니다.
필드 요약
| 한정자 및 형식 | 필드 및 설명 |
|---|---|
| static final java.lang.String |
PERSISTEDDIALOGSTATE
지속형 대화 상태의 ID입니다. |
생성자 요약
| 생성자 | Description |
|---|---|
| ComponentDialog(String dialogId) |
ComponentDialog 클래스의 새 인스턴스를 초기화합니다. |
메서드 요약
| 한정자 및 형식 | 메서드 및 설명 |
|---|---|
|
Component |
addDialog(Dialog dialog)
구성 요소 대화 상자에 새 Dialog 추가하고 업데이트된 구성 요소를 반환합니다. |
|
java.util.concurrent.CompletableFuture<Dialog |
beginDialog(DialogContext outerDc, Object options)
대화 상자가 시작되고 부모의 대화 상자 스택으로 푸시될 때 호출됩니다. |
|
java.util.concurrent.CompletableFuture<Dialog |
continueDialog(DialogContext outerDc)
대화 상자가 _continued_이면 호출됩니다. 여기서 대화는 활성 대화이고 사용자는 새 활동으로 회신합니다. |
|
Dialog |
createChildContext(DialogContext dc)
내부 DialogContext 만듭니다. |
|
protected
java.util.concurrent.CompletableFuture<Dialog |
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<Dialog |
onBeginDialog(DialogContext innerDc, Object options)
대화 상자가 시작되고 부모의 대화 상자 스택으로 푸시될 때 호출됩니다. |
|
protected
java.util.concurrent.CompletableFuture<Dialog |
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<Dialog |
resumeDialog(DialogContext outerDc, DialogReason reason, Object result)
부모 대화 스택의 자식 대화 상자가 이 순서를 완료하고 컨트롤을 이 대화 상자 구성 요소로 반환할 때 호출됩니다. |
| void |
setInitialDialogId(String withInitialDialogId)
초기 대화 상자에 할당된 ID를 설정합니다. |
다음에서 상속된 메서드 Dialog
다음에서 상속된 메서드 DialogContainer
다음에서 상속된 메서드 java.lang.Object
필드 세부 정보
PERSISTEDDIALOGSTATE
public static final String PERSISTEDDIALOGSTATE
지속형 대화 상태의 ID입니다.
생성자 세부 정보
ComponentDialog
public ComponentDialog(String dialogId)
ComponentDialog 클래스의 새 인스턴스를 초기화합니다.
매개 변수:
메서드 세부 정보
addDialog
public ComponentDialog addDialog(Dialog dialog)
구성 요소 대화 상자에 새 Dialog 추가하고 업데이트된 구성 요소를 반환합니다.
매개 변수:
반환:
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
대화 상자가 시작되고 부모의 대화 상자 스택으로 푸시될 때 호출됩니다.
재정의:
ComponentDialog.beginDialog(DialogContext outerDc, Object options)매개 변수:
반환:
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
대화 상자가 _continued_이면 호출됩니다. 여기서 대화는 활성 대화이고 사용자는 새 활동으로 회신합니다.
재정의:
ComponentDialog.continueDialog(DialogContext outerDc)매개 변수:
반환:
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)매개 변수:
반환:
endComponent
protected CompletableFuture
구성 요소 대화 상자를 부모 컨텍스트에서 종료합니다.
매개 변수:
반환:
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
대화 상자가 끝날 때 호출됩니다.
재정의:
ComponentDialog.endDialog(TurnContext turnContext, DialogInstance instance, DialogReason reason)매개 변수:
반환:
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
대화 상자가 초기화되었는지 확인합니다.
매개 변수:
반환:
getInitialDialogId
public String getInitialDialogId()
초기 대화 상자에 할당된 ID를 가져옵니다.
반환:
onBeginDialog
protected 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
대화 상자가 _continued_이면 호출됩니다. 여기서 대화는 활성 대화이고 사용자는 새 활동으로 회신합니다.
매개 변수:
반환:
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
대화 상자가 끝날 때 호출됩니다.
매개 변수:
반환:
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
대화 상자를 초기화합니다.
매개 변수:
반환:
onRepromptDialog
protected 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
대화 상자가 사용자에게 입력하라는 메시지를 다시 표시해야 할 때 호출됩니다.
재정의:
ComponentDialog.repromptDialog(TurnContext turnContext, DialogInstance instance)매개 변수:
반환:
resumeDialog
public CompletableFuture
부모 대화 스택의 자식 대화 상자가 이 순서를 완료하고 컨트롤을 이 대화 상자 구성 요소로 반환할 때 호출됩니다.
재정의:
ComponentDialog.resumeDialog(DialogContext outerDc, DialogReason reason, Object result)매개 변수:
반환:
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를 설정합니다.
매개 변수: