|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.ibm.conversation.base.BasicCpState
The BasicCpState class is a straightforward, vanilla-Java implementation of the CpState interface.
| Field Summary |
|---|
| Fields inherited from interface com.ibm.conversation.CpState |
|---|
IN_CHILD, NO_TYPE, NORMAL, TERMINAL, TYPE_STRINGS |
| Constructor Summary | |
|---|---|
BasicCpState(int newType)
Constructs a BasicCpState object of the given state type. |
|
| Method Summary | |
|---|---|
boolean |
addTransition(CpStateTransition newTrans)
Attempts to add the given transition to this state's transitions. |
java.lang.String |
getChildPolicyName()
Returns the name of the child policy to be loaded when this state is entered. |
java.lang.String |
getChildPolicyRole(java.lang.String parentRole)
Returns the role of the child conversation policy which will be played by the agent that is playing the given role in the current conversation policy (i.e., the conversation policy of which this CpState is a state). |
java.lang.String |
getName()
Returns the state's name. |
int |
getNumTransitions()
Returns the number of transitions from this state (i.e., its out-degree). |
java.lang.String |
getReturnCode()
Returns the state's return code. |
long |
getTimeoutInMillis()
Returns the state's timeout value. |
CpStateTransition |
getTransition(java.lang.String transName)
Returns the transition with the given name. |
java.util.Collection |
getTransitions()
Returns a Collection containing this state's transitions. |
java.util.Collection |
getTransitionsWithSender(java.lang.String role)
Returns a Collection containing all of the transitions for which the given role is the sender of a message. |
int |
getType()
Returns the states's type. |
int |
getTypeFromString(java.lang.String str)
Returns the state type matching the given string. |
java.lang.String |
getTypeString()
Returns a string corresponding to the state's type. |
boolean |
hasTransitionWithSender(java.lang.String role)
Indicates whether this state has a transition in which the given role sends a message. |
boolean |
setChildPolicyName(java.lang.String newName)
Attempts to set the name of the child policy to be loaded when this state is entered. |
boolean |
setChildPolicyRole(java.lang.String parentRole,
java.lang.String childRole)
Sets the role that will be played, in the child policy, by the agent that plays the given role in the current policy. |
void |
setName(java.lang.String newName)
Sets the state's name. |
boolean |
setReturnCode(java.lang.String rc)
Sets the state's return code. |
void |
setTimeoutInMillis(long millis)
Sets the state's timeout value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BasicCpState(int newType)
See CpState for the list of allowed types.
newType - The state type.| Method Detail |
public int getType()
CpState
getType in interface CpStatepublic java.lang.String getTypeString()
CpState
getTypeString in interface CpStatepublic int getTypeFromString(java.lang.String str)
CpStateDoes not change this state's type. (This method would be static, if static methods were allowed for interfaces.)
getTypeFromString in interface CpStatestr - The string for the state type.
public java.lang.String getName()
CpState
getName in interface CpStatepublic void setName(java.lang.String newName)
CpState
setName in interface CpStatenewName - The new name.public long getTimeoutInMillis()
CpStateThe timeout value gives the amount of time that the conversation may remain in this state.
getTimeoutInMillis in interface CpStatepublic void setTimeoutInMillis(long millis)
CpStateThe timeout value gives the amount of time that the conversation may remain in this state.
setTimeoutInMillis in interface CpStatemillis - The new timeout value, in milliseconds.public int getNumTransitions()
CpState
getNumTransitions in interface CpStatepublic java.util.Collection getTransitions()
CpState
The elements of the Collection are type CpStateTransition.
getTransitions in interface CpStatepublic java.util.Collection getTransitionsWithSender(java.lang.String role)
CpState
The elements of the Collection are type CpStateTransition.
getTransitionsWithSender in interface CpStaterole - The role in question.
public CpStateTransition getTransition(java.lang.String transName)
CpState
getTransition in interface CpStatetransName - The transition name.
null if not found.public boolean addTransition(CpStateTransition newTrans)
CpState
In order for the transition to be added, it must obey the connectivity constraints
that determine what types of transition may be added to each type of state.
See CpStateTransition for more information.
addTransition in interface CpStatenewTrans - the transition to add.
public boolean hasTransitionWithSender(java.lang.String role)
CpStateThis is meaningful only for normal states.
hasTransitionWithSender in interface CpStatepublic java.lang.String getChildPolicyName()
CpStateThis is meaningful only for in-child states.
getChildPolicyName in interface CpStatenull if there is none.public boolean setChildPolicyName(java.lang.String newName)
CpStateThis is allowed only for in-child states.
setChildPolicyName in interface CpStatenewName - The name of the child policy.
public java.lang.String getChildPolicyRole(java.lang.String parentRole)
CpStateThis is meaningful only for in-child states.
getChildPolicyRole in interface CpStateparentRole - The role in the current policy.
null if undefined.
public boolean setChildPolicyRole(java.lang.String parentRole,
java.lang.String childRole)
CpStateThis is allowed only for in-child states.
setChildPolicyRole in interface CpStateparentRole - The role in the current policy.childRole - The role in the child policy.
public java.lang.String getReturnCode()
CpStateThis is meaningful only for terminal states.
getReturnCode in interface CpStatenull if undefined.public boolean setReturnCode(java.lang.String rc)
CpStateThis is allowed only for terminal states.
setReturnCode in interface CpStaterc - The return code.
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||