|
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 CpStateTransition interface represents a transition in a CPStateMachine.
There are three types of transition:
Connectivity constraints: There are constraints on the way in which states and transitions are connected together, as follows:
This is a single fat interface for all transition types. It was done this way, rather than as a base interface and three sub-interfaces, because of the relative simplicity of the transition's API.
Field Summary | |
---|---|
static int |
CHILD_RETURN
The transition type for child-return transitions. |
static int |
NO_TYPE
The transition type for transitions whose type has not been set. |
static int |
SEND_MESSAGE
The transition type for send-message transitions. |
static int |
TIMEOUT
The transition type for timeout transitions. |
static java.lang.String[] |
TYPE_STRINGS
Strings for each of the transition types. |
Method Summary | |
---|---|
java.lang.String |
getChildReturn()
Returns the child-return code. |
MessageDescription |
getMessageDescription()
Returns the MessageDescription for the message associated with this transition. |
java.lang.String |
getName()
Returns the transition's name. |
java.lang.String |
getSenderRole()
Returns the role that is the message sender. |
java.lang.String |
getSourceName()
Returns the name of the transition's source state. |
java.lang.String |
getTargetName()
Returns the name of the transition's target (or destination) state. |
int |
getType()
Return the transition's type. |
int |
getTypeFromString(java.lang.String str)
Returns the transition type matching the given string. |
java.lang.String |
getTypeString()
Returns a string corresponding to the transition's type. |
boolean |
setChildReturn(java.lang.String newReturn)
Sets the child-return code. |
boolean |
setMessageDescription(MessageDescription desc)
Sets the MessageDescription for the message associated with this transition. |
void |
setName(java.lang.String newName)
Sets the transition's name. |
boolean |
setSenderRole(java.lang.String newRole)
Sets the role that sends the message. |
void |
setSourceName(java.lang.String newName)
Sets the name of the transition's source state. |
void |
setTargetName(java.lang.String newName)
Sets the name of the transition's target state. |
Field Detail |
public static final int NO_TYPE
public static final int SEND_MESSAGE
public static final int CHILD_RETURN
public static final int TIMEOUT
public static final java.lang.String[] TYPE_STRINGS
This is public as a side-effect of the design, but the values shouldn't be accessed
directly. Use getTypeString()
or getTypeFromString()
instead.
Method Detail |
public int getType()
public java.lang.String getTypeString()
public int getTypeFromString(java.lang.String str)
Does not change this transition's type. (This method would be static, if static methods were allowed for interfaces.)
str
- The string for the transition type.public java.lang.String getName()
public void setName(java.lang.String newName)
newName
- The new name.public java.lang.String getSourceName()
null
if there isn't one.public void setSourceName(java.lang.String newName)
This does not modify the source state itself, only the name stored in this transition.
Therefore it should be used only in conjunction with calls to the CpState
API
to remove
this transition from the old source state and add it to the new source state
newName
- The new source state name.public java.lang.String getTargetName()
null
if there isn't one.public void setTargetName(java.lang.String newName)
This does not modify the target state itself, only the name stored in this transition.
Therefore it should be used only in conjunction with calls to the CpState
API
to remove
this transition from the old target state and add it to the new target state.
newName
- The new target state name.public MessageDescription getMessageDescription()
This is meaningful only for send-message transitions.
null
if
there isn't one.public boolean setMessageDescription(MessageDescription desc)
This is meaningful only for send-message transitions.
desc
- The MessageDescription for this transitions's message.public java.lang.String getSenderRole()
This is meaningful only for send-message transitions.
null
if undefined.public boolean setSenderRole(java.lang.String newRole)
This is meaningful only for send-message transitions.
newRole
- the role that sends the mesage.public java.lang.String getChildReturn()
This is meaningful only for child-return transitions.
null
if undefined.public boolean setChildReturn(java.lang.String newReturn)
This is meaningful only for child-return transitions.
newReturn
- The new child-return code.
|
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 |