|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bukkit.conversations.ConversationContext
public class ConversationContext
A ConversationContext provides continuity between nodes in the prompt graph by giving the developer access to the
subject of the conversation and a generic map for storing values that are shared between all Prompt
invocations.
Constructor Summary | |
---|---|
ConversationContext(Plugin plugin,
Conversable forWhom,
Map<Object,Object> initialSessionData)
|
Method Summary | |
---|---|
Conversable |
getForWhom()
Gets the subject of the conversation. |
Plugin |
getPlugin()
Gets the plugin that owns this conversation. |
Object |
getSessionData(Object key)
Gets session data shared between all Prompt invocations. |
void |
setSessionData(Object key,
Object value)
Sets session data shared between all Prompt invocations. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConversationContext(Plugin plugin, Conversable forWhom, Map<Object,Object> initialSessionData)
plugin
- The owning plugin.forWhom
- The subject of the conversation.initialSessionData
- Any initial values to put in the sessionData map.Method Detail |
---|
public Plugin getPlugin()
public Conversable getForWhom()
public Object getSessionData(Object key)
Prompt
invocations. Use this as a way
to pass data through each Prompt as the conversation develops.
key
- The session data key.
public void setSessionData(Object key, Object value)
Prompt
invocations. Use this as a way to pass
data through each prompt as the conversation develops.
key
- The session data key.value
- The session data value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |