Interface Prompt

    • Field Detail

      • END_OF_CONVERSATION

        static final Prompt END_OF_CONVERSATION
        A convenience constant for indicating the end of a conversation.
    • Method Detail

      • getPromptText

        @NotNull
        String getPromptText​(@NotNull
                             ConversationContext context)
        Gets the text to display to the user when this prompt is first presented.
        Parameters:
        context - Context information about the conversation.
        Returns:
        The text to display.
      • blocksForInput

        boolean blocksForInput​(@NotNull
                               ConversationContext context)
        Checks to see if this prompt implementation should wait for user input or immediately display the next prompt.
        Parameters:
        context - Context information about the conversation.
        Returns:
        If true, the Conversation will wait for input before continuing. If false, acceptInput(ConversationContext, String) will be called immediately with null input.
      • acceptInput

        @Nullable
        Prompt acceptInput​(@NotNull
                           ConversationContext context,
                           @Nullable
                           String input)
        Accepts and processes input from the user. Using the input, the next Prompt in the prompt graph is returned.
        Parameters:
        context - Context information about the conversation.
        input - The input text from the user.
        Returns:
        The next Prompt in the prompt graph.