public class InactivityConversationCanceller extends java.lang.Object implements ConversationCanceller
Conversation after
a period of inactivity by the user.| 限定符和类型 | 字段和说明 |
|---|---|
protected Conversation |
conversation |
protected Plugin |
plugin |
protected int |
timeoutSeconds |
| 构造器和说明 |
|---|
InactivityConversationCanceller(Plugin plugin,
int timeoutSeconds)
Creates an InactivityConversationCanceller.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
cancelBasedOnInput(ConversationContext context,
java.lang.String input)
根据用户的输入反馈取消一个会话.
|
protected void |
cancelling(Conversation conversation)
Subclasses of InactivityConversationCanceller can override this method
to take additional actions when the inactivity timer abandons the
conversation.
|
ConversationCanceller |
clone()
允许某一
ConversationFactory在创建一个新Conversation时
复制这个ConversationCanceller. |
void |
setConversation(Conversation conversation)
设置本ConversationCanceller可以取消的会话.
|
protected Plugin plugin
protected int timeoutSeconds
protected Conversation conversation
public InactivityConversationCanceller(Plugin plugin, int timeoutSeconds)
plugin - The owning plugin.timeoutSeconds - The number of seconds of inactivity to wait.public void setConversation(Conversation conversation)
ConversationCanceller原文:Sets the conversation this ConversationCanceller can optionally cancel.
setConversation 在接口中 ConversationCancellerconversation - 一个会话public boolean cancelBasedOnInput(ConversationContext context, java.lang.String input)
ConversationCanceller原文:Cancels a conversation based on user input.
cancelBasedOnInput 在接口中 ConversationCancellercontext - 关于会话的Context信息input - 用户的输入值public ConversationCanceller clone()
ConversationCancellerConversationFactory在创建一个新Conversation时
复制这个ConversationCanceller.
实现这个方法应当重置一切内部的对象状态.
原文:Allows the ConversationFactory to duplicate this
ConversationCanceller when creating a new Conversation.
Implementing this method should reset any internal object state.
clone 在接口中 ConversationCancellerclone 在类中 java.lang.Objectprotected void cancelling(Conversation conversation)
conversation - The conversation being abandoned.