|
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 |
java.lang.Object | +--com.ibm.conversation.base.BasicCpHandlerStack
Class BasicCpHandlerStack implements the ConversationContext interface as a stack of ConversationPolicyHandlers.
Constructor Summary | |
---|---|
BasicCpHandlerStack()
Constructs a BasicCpHandlerStack object. |
Method Summary | |
---|---|
void |
clear()
Clears the stack of policy handlers. |
ConversationPolicyHandler |
getActivePolicyHandler()
Returns the currently active ConversationPolicyHandler. |
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. |
ConversationPolicyHandler |
getConversationPolicyHandlerAt(int level)
Returns the ConversationPolicyHandler at the given level. |
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. |
ConversationPolicyHandler |
pop()
Pops the bottom policy handler off the stack. |
void |
push(ConversationPolicyHandler cph)
Pushes the given policy handler on the stack. |
java.lang.String |
toString()
Returns a human-readable, multi-line description of the stack. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BasicCpHandlerStack()
Method Detail |
public int getNumPolicyLevels()
ConversationContext
getNumPolicyLevels
in interface ConversationContext
com.ibm.conversation.ConversationContext
public int getActivePolicyLevel()
ConversationContext
This is equal to getNumPolicyLevels()-1
.
getActivePolicyLevel
in interface ConversationContext
com.ibm.conversation.ConversationContext
public java.lang.String getActivePolicyName()
ConversationContext
getActivePolicyName
in interface ConversationContext
com.ibm.conversation.ConversationContext
null
if there is none.public java.lang.String getActiveSelfRole()
ConversationContext
getActiveSelfRole
in interface ConversationContext
com.ibm.conversation.ConversationContext
null
if there is none.public java.lang.String getActiveStateName()
ConversationContext
See ConversationPolicyHandler
for a discussion of the meaning of "current state".
getActiveStateName
in interface ConversationContext
com.ibm.conversation.ConversationContext
null
if there is none.public java.lang.String getPolicyNameAt(int level)
ConversationContext
The root policy is level 0.
getPolicyNameAt
in interface ConversationContext
com.ibm.conversation.ConversationContext
level
- The level in question.public java.lang.String getSelfRoleAt(int level)
ConversationContext
The root policy is level 0.
getSelfRoleAt
in interface ConversationContext
com.ibm.conversation.ConversationContext
level
- The level in question.public java.lang.String getStateNameAt(int level)
ConversationContext
The root policy is level 0.
See ConversationPolicyHandler
for a discussion of the
meaning of "current state".
getStateNameAt
in interface ConversationContext
com.ibm.conversation.ConversationContext
level
- The level in question.null
if there is none.public ConversationPolicyHandler getActivePolicyHandler()
null
if there
is none.public ConversationPolicyHandler getConversationPolicyHandlerAt(int level)
The root conversation policy is at level 0.
level
- The desired level in the stack.null
if there
is none.public void push(ConversationPolicyHandler cph)
It will become the new "bottom" level--i.e., the one with the highest numerical value.
cph
- The policy handler to be pushed onto the stack.public ConversationPolicyHandler pop()
"Bottom" means, having the highest numerical value of level.
public void clear()
public java.lang.String toString()
For debugging and unit testing.
toString
in class java.lang.Object
|
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 |