|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The ConversationContext interface represents the current conversational context of a Conversation.
The conversational context consists of a list of tuples, one for each
conversation policy in the current stack of policies, starting with the root policy and
ending with the currently active policy.
The tuple for each conversation policy consists of the policy name, the role played
by the owner of the Conversation, and the current state.
See ConversationPolicyHandler
for a discussion of the meaning of "current state".
Note that this reflects an architectural assumption that conversation policies are related to one another in the manner of entries in a stack, rather than, say, nodes in a tree. In the stack, the root conversation policy is defined to be level 0, and the child of the policy at level N is at level N+1. The currently active policy is always the one with the greatest level.
ConversationContext is a read-only interface because context changes can only be made by the Conversation itself, as it processes inputs. For example, the Conversation's DecisionLogicAdapter is not allowed to change the context directly; it can only do so by means of passing legal decisions into the Conversation.
Method Summary | |
---|---|
int |
getActivePolicyLevel()
Returns the level of the currently active conversation policy. |
java.lang.String |
getActivePolicyName()
Returns the name of the currently active conversation policy. |
java.lang.String |
getActiveSelfRole()
Returns the role this agent is playing in the currently active conversation policy. |
java.lang.String |
getActiveStateName()
Returns the name of the current state of the currently active conversation policy. |
int |
getNumPolicyLevels()
Returns the current number of conversation policy levels. |
java.lang.String |
getPolicyNameAt(int level)
Returns the name of the policy at the given level. |
java.lang.String |
getSelfRoleAt(int level)
Returns the role this agent in playing in the policy at the given level. |
java.lang.String |
getStateNameAt(int level)
Returns the current state of the policy at the given level. |
Method Detail |
public int getNumPolicyLevels()
public int getActivePolicyLevel()
This is equal to getNumPolicyLevels()-1
.
public java.lang.String getActivePolicyName()
null
if there is none.public java.lang.String getActiveSelfRole()
null
if there is none.public java.lang.String getActiveStateName()
See ConversationPolicyHandler
for a discussion of the meaning of "current state".
null
if there is none.public java.lang.String getPolicyNameAt(int level)
The root policy is level 0.
level
- The level in question.public java.lang.String getSelfRoleAt(int level)
The root policy is level 0.
level
- The level in question.public java.lang.String getStateNameAt(int level)
The root policy is level 0.
See ConversationPolicyHandler
for a discussion of the
meaning of "current state".
level
- The level in question.null
if there is none.
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |