|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Prompt
A Prompt is the main constituent of a Conversation
. Each prompt displays text to the user and optionally
waits for a user's response. Prompts are chained together into a directed graph that represents the conversation
flow. To halt a conversation, END_OF_CONVERSATION is returned in liu of another Prompt object.
Field Summary | |
---|---|
static Prompt |
END_OF_CONVERSATION
A convenience constant for indicating the end of a conversation. |
Method Summary | |
---|---|
Prompt |
acceptInput(ConversationContext context,
String input)
Accepts and processes input from the user. |
boolean |
blocksForInput(ConversationContext context)
Checks to see if this prompt implementation should wait for user input or immediately display the next prompt. |
String |
getPromptText(ConversationContext context)
Gets the text to display to the user when this prompt is first presented. |
Field Detail |
---|
static final Prompt END_OF_CONVERSATION
Method Detail |
---|
String getPromptText(ConversationContext context)
context
- Context information about the conversation.
boolean blocksForInput(ConversationContext context)
context
- Context information about the conversation.
Conversation
will wait for input before continuing.Prompt acceptInput(ConversationContext context, String input)
context
- Context information about the conversation.input
- The input text from the user.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |